GHSA-3mg3-cr28-46gc / CVE-2026-129292: PHP-FPM status endpoint XSS via unescaped user and script fields
- Published:
- Fetched:
- Updated:
- Affects:
- php sapi-fpm
https://github.com/php/php-src/security/advisories/GHSA-3mg3-cr28-46gc ↗
PHP-FPM status endpoint XSS via unescaped user and script fields ### Summary PHP-FPM can include attacker-controlled request metadata without escaping it in the full status response. An unauthenticated attacker can place HTML or JavaScript in a worker's scoreboard entry and execute it in the browser of an operator who later views the full HTML status page. The attacker does not need access to the status endpoint. ### Details The earlier fix for [CVE-2026-6735](https://github.com/php/php-src/security/advisories/GHSA-7qg2-v9fj-4mwv) escaped the request URI and query string, but left the request method, authentication user and script filename unescaped in the per-process status output. These values are stored in the PHP-FPM scoreboard and later inserted into HTML, XML and JSON responses without the encoding required by each format. The most direct attack uses the username from an HTTP Basic authentication header. When the front end forwards this header to PHP-FPM, PHP can decode and store the supplied username even if the application does not use Basic authentication. The scoreboard retains up to 31 bytes of the username, which is enough for an HTML element with a JavaScript event handler. A request to an ordinary PHP script in the pool can therefore plant a payload that runs when another user opens the status endpoint with `full&html`. The value remains in that worker's scoreboard entry until it is replaced by a later request. The script filename provides another injection path when an attacker can influence the filename recorded by FPM, including configurations using `cgi.fix_pathinfo=0`. Ordinary web servers restrict the characters accepted in request methods, so the request-method field does not by itself establish the same HTTP attack path. Unescaped quotes or markup in these fields can also corrupt JSON or XML status responses and interfere with monitoring consumers. The fix applies a common, format-appropriate escaping helper to the request method, request URI, query string, authentication user and script filename before rendering the full status response. A separate client-side injection issue in the bundled `status.html` dashboard is tracked in [GHSA-q8fm-p8fx-h6r6](https://github.com/php/php-src/security/advisories/GHSA-q8fm-p8fx-h6r6). ### Impact Exploitation requires an enabled PHP-FPM status endpoint, a request path through which attacker-controlled metadata reaches the affected pool, and a user or tool that renders the full status data as HTML. For the authentication-user attack, the front end must forward the Basic authentication header to FPM. Restricting access to the status endpoint does not prevent an attacker from planting the payload through a separate application request. Successful exploitation runs JavaScript in the status page's origin. It can expose request URIs, query strings and other information shown on the status page. If the page shares an origin with the application, the script can also act with the viewing user's session and read data available to that Affected packages: php:sapi-fpm Patched: sapi-fpm 8.2.36, sapi-fpm 8.3.37, sapi-fpm 8.4.28, sapi-fpm 8.5.13