CVE-2026-129538: PHP-CGI out-of-bounds read and write during PATH_INFO correction
Fixed (PHP-CGI out-of-bounds read and write during PATHINFO correction). (CVE-2026-129538)
Other sources
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 8.2. before 8.2.36, 8.3. before 8.3.37, 8.4. before 8.4.28 and 8.5. before 8.5.13.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.2.36 - Upgrade
Upgrade
debian/php8.4to a version that resolves this vulnerability.Fixed in 8.4.28-1~deb13u1 - 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 - Configuration
Disable cgi.fix_pathinfo to prevent the affected PATH_INFO correction behavior.
PHP-CGI cgi.fix_pathinfo = disabled