The vulnerability is a classic reflected XSS. The application uses the fsNick cookie to store the user's nickname and displays it on the page. The getNick function in the User model retrieves the cookie's value without any sanitization. An attacker can modify the fsNick cookie to include a malicious script. When the application reads the cookie and displays the nickname, the script is executed in the user's browser. The vulnerable function is FacturaScripts\Core\Model\User::getNick because it is responsible for retrieving the unsanitized cookie value. This value is then used in the Admin.php controller, which passes it to the view, where it is rendered, triggering the XSS.