Skip to content
NewA calmer, faster ZeroHour

CVE-2026-129538

Out-of-bounds read/write in PHP CGI PATH_INFO handling

CVSS 4.0
6.9 medium
EPSS
—
Published
·
Modified
Analyze CVE-2026-129538 with Vani AIImpact, affected versions, exploitation status, mitigations and detection

php-cgi, in CGI or FastCGI mode with cgi.fix_pathinfo on (the default), can read and write past a buffer while correcting PATH_INFO when the path stripped from SCRIPT_FILENAME or PATH_TRANSLATED is longer than PATH_INFO, or PATH_INFO is empty. An unauthenticated remote attacker needs a web-server mapping that supplies those inconsistent values, or a FastCGI listener open to untrusted clients. The result can be a crash, limited process-memory disclosure if the app returns PATH_INFO or PATH_TRANSLATED, and memory corruption. PHP-FPM and the Apache module are not affected.

What to do: Upgrade PHP to 8.2.36, 8.3.37, 8.4.28, or 8.5.13, matching the branch in use.

ProductAffectedFixed in
PHP8.2.* before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28, and 8.5.* before 8.5.138.2.36, 8.3.37, 8.4.28, 8.5.13
Estimated exposure
No basis for an estimate.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description · NVD

PHP-CGI out-of-bounds read and write during PATH_INFO correction. The PHP CGI binary (php-cgi), in CGI and FastCGI mode with cgi.fix_pathinfo enabled (the default), can perform an out-of-bounds read and write when the path removed from SCRIPT_FILENAME or PATH_TRANSLATED is longer than the supplied PATH_INFO, or when PATH_INFO 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 PATH_INFO or PATH_TRANSLATED, 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.

Weakness
CWE-125, CWE-787, CWE-823
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

2 stories