A critical vulnerability in PHP-FPM could allow unauthenticated attackers to execute arbitrary PHP code on affected servers under specific configuration and application conditions.
Tracked as CVE-2026-129289, the vulnerability involves improper handling of unread HTTP request body data when persistent backend connections are reused.
The PHP security advisory, published on November 19, 2026, assigns the flaw a CVSS 4.0 score of 9.2 out of 10, classifying it as critical.
The issue is particularly concerning for applications that use PHP-FPM behind web servers or proxies configured to reuse FastCGI connections. https://github.com/php/php-src/security/advisories/GHSA-qc49-hpvq-g2w6
What Is CVE-2026-129289?
PHP-FPM (FastCGI Process Manager) manages PHP application processes and communicates with web servers through the FastCGI protocol.
When a web server receives an HTTP request, it forwards the request to PHP-FPM for processing. PHP-FPM handles the request and returns the result to the web server.
The vulnerability occurs when PHP fails to properly discard unread portions of an HTTP request body before reusing a persistent backend connection.
Under certain conditions, an attacker can exploit this behaviour to make leftover request data appear as a separate FastCGI request.
The forged request can contain attacker-controlled parameters, potentially allowing the attacker to bypass normal front-end routing and execute PHP code with the privileges of the PHP-FPM worker.
How Does the Request-Smuggling Vulnerability Work?
The underlying problem is related to how PHP handles the php://input stream.
PHP provides php://input as a read-only stream that allows applications to access the raw body of an incoming HTTP request.
However, the stream is read lazily. Opening it does not necessarily mean that the entire request body has been consumed.
During request shutdown, vulnerable PHP versions incorrectly treated the existence of this stream as evidence that the request body had already been handled.
As a result, unread bytes could remain in the backend connection.
The attack involves several stages:
1. A crafted HTTP request arrives
An unauthenticated attacker sends a specially constructed multipart/form-data request to an application.
2. PHP leaves request data unread
The application opens php://input without consuming the complete request body. A vulnerable request-cleanup path fails to discard the remaining data.
3. The backend connection is reused
When persistent FastCGI connections are enabled, PHP-FPM keeps the connection available for another request.
4. Remaining bytes are interpreted as a new request
The attacker-controlled bytes can be interpreted as a separate FastCGI request, even though the front-end web server did not independently create or authorize that request.
5. PHP-FPM processes the forged request
The forged request can manipulate FastCGI parameters such as SCRIPT_FILENAME, REMOTE_ADDR, and PHP_ADMIN_VALUE.
Under the demonstrated attack conditions, these parameters can be used to execute attacker-controlled PHP code with the privileges of the PHP-FPM worker.
This creates a security boundary bypass between the front-end HTTP server and the PHP backend. https://github.com/php/php-src/security/advisories/GHSA-qc49-hpvq-g2w6
Which PHP Versions Are Affected?
The PHP security advisory lists the following affected version ranges:
| PHP branch | Affected versions | Fixed version |
|---|---|---|
| PHP 8.2 | 8.2.0 to 8.2.35 | 8.2.36 |
| PHP 8.3 | 8.3.0 to 8.3.36 | 8.3.37 |
| PHP 8.4 | 8.4.0 to 8.4.27 | 8.4.28 |
| PHP 8.5 | 8.5.0 to 8.5.12 | 8.5.13 |
PHP 8.6.0 also includes the security fix.
The advisory notes that the vulnerable code path was introduced with lazy php://input handling in PHP 5.6.0, based on code inspection. Older unsupported releases should therefore not be assumed safe simply because they are absent from the listed supported-branch version ranges.
Linux distributions may also backport security patches without changing the upstream PHP version number. Administrators should check their distribution's security advisories rather than relying only on the version string. https://www.php.net/ChangeLog-8.php
Are All PHP-FPM Servers Vulnerable?
No. The vulnerability requires specific conditions.
The demonstrated PHP-FPM attack requires both:
- A front-end server or proxy that reuses persistent backend FastCGI connections.
- An application execution path that opens
php://inputwithout reading the request body completely.
Relevant configurations include:
- Nginx with
fastcgi_keep_conn on. - Apache
mod_proxy_fcgiwithenablereuse=on. - HAProxy or other FastCGI front ends configured to retain backend connections.
Standard Nginx and Apache configurations that close FastCGI backend connections after each request are not affected by the demonstrated PHP-FPM attack.
The advisory also discusses LSAPI, where the shared request-cleanup issue can disrupt subsequent requests. However, the specific FastCGI parameter manipulation and remote code execution chain described for PHP-FPM do not apply to LSAPI in the same way.
This distinction is important because the vulnerability should not be presented as an unconditional remote code execution flaw affecting every PHP installation. https://access.redhat.com/security/vulnerabilities/RHSB-2026-020
How to Protect PHP-FPM Applications
The recommended solution is to install a fixed PHP release.
Administrators should upgrade to the appropriate patched version:
- PHP 8.2.36 or later within the supported branch.
- PHP 8.3.37 or later.
- PHP 8.4.28 or later.
- PHP 8.5.13 or later.
- PHP 8.6.0 or later.
For systems that cannot be updated immediately, the PHP advisory recommends disabling persistent backend connection reuse.
For Nginx, leave fastcgi_keep_conn disabled.
For Apache, leave mod_proxy_fcgi connection reuse through enablereuse disabled.
Other FastCGI front ends should also be configured to close backend connections after each request.
Reading php://input completely before request completion can prevent the demonstrated unread-body condition, but the PHP advisory warns that error paths, resource exhaustion, and application shutdown can make this unreliable as the only mitigation.
PHP-FPM and LSAPI listeners should never be exposed directly to untrusted networks.
After applying configuration changes, verify the effective settings for every relevant PHP-FPM pool, virtual host, and application override. Restart the PHP master process and workers where required for configuration changes to take effect. https://access.redhat.com/security/vulnerabilities/RHSB-2026-020
Why This Vulnerability Matters
PHP-FPM is widely used to run PHP applications behind web servers and reverse proxies. A flaw in its request-handling lifecycle can therefore affect an important part of the application infrastructure.
What makes CVE-2026-129289 especially interesting from an engineering perspective is that the problem does not depend on memory corruption or a race condition.
Instead, it arises from incorrect handling of request-body data and connection reuse.
It also demonstrates why backend protocol boundaries deserve the same security attention as public HTTP endpoints. A request that was never independently authorized by the front end should never become a new executable backend request.
For developers and infrastructure teams, the immediate priorities are to identify affected PHP installations, review FastCGI connection reuse settings, and deploy the appropriate security updates.
The key lesson is that request cleanup is a security boundary. Unread data from one request must never be allowed to become the next request.



