BIT-php-2026-129538: PHP-CGI out-of-bounds read and write during PATH_INFO correction
PHP-CGI out-of-bounds read and write during PATHINFO correction.
The PHP CGI binary (php-cgi), in CGI and FastCGI mode with cgi.fixpathinfo enabled (the default), can perform an out-of-bounds read and write when the path removed from SCRIPTFILENAME or PATHTRANSLATED is longer than the supplied PATHINFO, or when PATHINFO is empty. This requires a web server mapping that passes such inconsistent values, or a FastCGI listener reachable by untrusted clients. An unauthenticated remote attacker can crash the process, may obtain process memory if the application exposes PATHINFO or PATHTRANSLATED, and may corrupt memory. PHP-FPM and the Apache module are not affected.
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?
Only the PHP CGI binary used in CGI or FastCGI mode is affected, with cgi.fix_pathinfo enabled. PHP-FPM and the Apache module are not affected; exposure also requires either a web-server mapping that supplies inconsistent SCRIPT_FILENAME or PATH_TRANSLATED and PATH_INFO values, or a FastCGI listener reachable by untrusted clients.
Is the default configuration affected?
cgi.fix_pathinfo is enabled by default, but that alone does not establish exploitability. The vulnerable condition also depends on inconsistent path values being passed by the web server or on untrusted clients being able to reach the FastCGI listener.
What access does an attacker need, and what could happen?
An attacker does not need authentication or user interaction. They need to be able to send requests through an exposed vulnerable CGI/FastCGI path; successful exploitation can crash the process, potentially disclose process memory where PATH_INFO or PATH_TRANSLATED is exposed by the application, or corrupt memory.
Which PHP versions need updating?
Update PHP to 8.2.36 or later, 8.3.37 or later, 8.4.28 or later, or 8.5.13 or later, as applicable. Versions earlier than those releases in the listed branches are affected.
What can be checked while an update is pending?
Determine whether the deployment runs php-cgi rather than PHP-FPM or the Apache module, whether cgi.fix_pathinfo is enabled, and whether the web-server configuration can pass inconsistent SCRIPT_FILENAME or PATH_TRANSLATED and PATH_INFO values. Also check whether any FastCGI listener is reachable by untrusted clients.