BIT-libphp-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 this issue?
Deployments using PHP-FPM are exposed when the frontend reuses backend FastCGI connections. Examples include nginx configured with fastcgi_keep_conn on and Apache mod_proxy_fcgi configured with enablereuse=on; connection reuse is not the default in nginx or Apache.
What does an attacker need to exploit it?
An unauthenticated remote attacker can exploit the issue with a single crafted multipart/form-data request. Exploitation depends on an application opening php://input but not reading the request body through to its end.
What is the potential impact?
The attacker can forge a backend request with selected 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 same connection can also be disrupted.
What can be done if updating PHP is not immediately possible?
Disable frontend-to-PHP-FPM backend connection reuse. In the configurations identified, this means avoiding nginx fastcgi_keep_conn on and Apache mod_proxy_fcgi enablereuse=on.
Which PHP releases contain the fix?
Fixed versions are PHP 8.2.36, 8.3.37, 8.4.28, and 8.5.13 or later within their respective release branches. Versions before those releases are affected.