The analysis of the security advisory and the associated patch commit (5f540fe361e7e13e8c5a32805b793a25e9e26a0e) confirms a Cross-Site Request Forgery (CSRF) vulnerability in Froxlor's AJAX handling. The root cause is that the main AJAX entry point, lib/ajax.php, and the class that processes its requests, Froxlor\Ajax\Ajax, did not implement the same CSRF protection as the rest of the application.
The primary vulnerable function is Froxlor\Ajax\Ajax::handle. It serves as the dispatcher for AJAX actions. The patch introduces a critical CSRF token validation block at the beginning of this function, which was previously absent. This allowed any POST request from a foreign origin to be processed as long as the user had an active session cookie.
The most impactful sink function is Froxlor\Ajax\Ajax::editApiKey, which is called by handle. This function modifies API key properties in the database based on POST data. An attacker could exploit the lack of CSRF protection in handle to trick an administrator's browser into sending a malicious request to modify an API key, for example, by whitelisting the attacker's IP address.
The patch also modifies Froxlor\Ajax\Ajax::getValidatedSession to generate the CSRF token and the frontend JavaScript (apikeys.js) to send it, confirming the end-to-end nature of the vulnerability and its fix.