BIT-php-2026-129289: PHP-FPM request smuggling through an unread HTTP request body
PHP-FPM request smuggling through an unread HTTP request body.
PHP does not discard the unread part of an HTTP request body at request shutdown when the application has opened php://input without reading it to the end. When the front end reuses backend connections, which is not the default in nginx or Apache (for example nginx with fastcgikeepconn on, or Apache modproxyfcgi with enablereuse=on), PHP-FPM can parse the leftover bytes as a new FastCGI request. An unauthenticated remote attacker can use a single crafted multipart/form-data request to forge a backend request with chosen parameters such as SCRIPTFILENAME, REMOTEADDR and PHPADMINVALUE, which can lead to execution of attacker-controlled PHP code. With LSAPI, subsequent requests on the connection can be disrupted.
This issue affects PHP versions before 8.2.36, 8.3. before 8.3.37, 8.4. before 8.4.28 and 8.5. before 8.5.13.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
bitnami/libphpto a version that resolves this vulnerability.Fixed in 8.2.36 - Upgrade
Upgrade
bitnami/libphpto a version that resolves this vulnerability.Fixed in 8.3.37 - Upgrade
Upgrade
bitnami/libphpto a version that resolves this vulnerability.Fixed in 8.4.28 - Upgrade
Upgrade
bitnami/libphpto a version that resolves this vulnerability.Fixed in 8.5.13 - Upgrade
Upgrade
bitnami/phpto a version that resolves this vulnerability.Fixed in 8.2.36 - Upgrade
Upgrade
bitnami/phpto a version that resolves this vulnerability.Fixed in 8.3.37 - Upgrade
Upgrade
bitnami/phpto a version that resolves this vulnerability.Fixed in 8.4.28 - Upgrade
Upgrade
bitnami/phpto a version that resolves this vulnerability.Fixed in 8.5.13 - Upgrade
Upgrade
bitnami/php-minto a version that resolves this vulnerability.Fixed in 8.2.36 - Upgrade
Upgrade
bitnami/php-minto a version that resolves this vulnerability.Fixed in 8.3.37 - Upgrade
Upgrade
bitnami/php-minto a version that resolves this vulnerability.Fixed in 8.4.28 - Upgrade
Upgrade
bitnami/php-minto a version that resolves this vulnerability.Fixed in 8.5.13 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.2.36 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.3.37 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.4.28 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.5.13
Event History
Frequently Asked Questions
Which deployments are exposed to the PHP-FPM request-smuggling condition?
The condition requires PHP-FPM behind a front end that reuses backend FastCGI connections. This is not the default for nginx or Apache, but examples include nginx with fastcgi_keep_conn enabled and Apache mod_proxy_fcgi with enablereuse enabled.
What does an attacker need to exploit this issue?
An unauthenticated remote attacker can send a single crafted multipart/form-data request. Exploitation depends on an application opening php://input without reading the request body to its end, leaving bytes for PHP-FPM to interpret on a reused backend connection.
What can happen if exploitation succeeds?
An attacker can forge a backend request with chosen parameters, including SCRIPT_FILENAME, REMOTE_ADDR, and PHP_ADMIN_VALUE. This can lead to execution of attacker-controlled PHP code; with LSAPI, later requests on the affected connection can also be disrupted.
What mitigation is available if PHP cannot be upgraded immediately?
Disable frontend-to-PHP-FPM backend connection reuse where possible. For nginx, this means avoiding fastcgi_keep_conn; for Apache mod_proxy_fcgi, avoid enablereuse.
Which PHP versions contain the fix?
Upgrade to PHP 8.2.36, 8.3.37, 8.4.28, or 8.5.13 or later within the applicable release branch. Versions before those releases are affected.