Vulnerability DatabaseCVE-2026-129538

CVE-2026-129538: 
PHP vulnerability analysis and mitigation

Overview

CVE-2026-129538 is an out-of-bounds read and write vulnerability in the PHP CGI binary (php-cgi) during PATH_INFO correction. When cgi.fix_pathinfo is enabled (the default), php-cgi can access memory outside the supplied path information buffer if the path removed from SCRIPT_FILENAME or PATH_TRANSLATED is longer than the supplied PATH_INFO, or when PATH_INFO is empty. Affected versions include PHP 8.2.0–8.2.35, 8.3.0–8.3.36, 8.4.0–8.4.27, and 8.5.0–8.5.12; PHP-FPM and the Apache module are not affected. It carries a CVSS v4.0 base score of 6.9 (Medium) (GitHub Advisory, Feedly).

Technical details

The root cause lies in init_request_info() within the PHP CGI SAPI, where PHP calculates a replacement PATH_INFO by subtracting the length of a removed suffix from the end of the supplied value without first verifying that the suffix is not longer than the buffer (CWE-125, CWE-787, CWE-823). If the suffix is longer than PATH_INFO, the resulting pointer falls before the start of the PATH_INFO buffer; subsequent path correction then reads, writes, and copies memory through this invalid pointer. Exploitation requires a specific web server configuration — such as an Apache CGI setup using Action combined with a rewrite to an absolute filesystem path, or a FastCGI listener reachable by untrusted clients — that passes inconsistent SCRIPT_FILENAME/PATH_TRANSLATED and PATH_INFO values. The fix validates lengths before deriving the pointer and skips the rewrite when no valid replacement exists (GitHub Advisory).

Impact

An unauthenticated remote attacker can crash the php-cgi process (denial of service), potentially expose process memory contents via $_SERVER['PATH_INFO'] or PATH_TRANSLATED (information disclosure), and corrupt memory during path correction. Crashes were confirmed on default, non-debug builds of PHP 8.2.35, 8.3.36, 8.4.27, and 8.5.12. While memory corruption has been observed, code execution has been claimed but not confirmed at the time of disclosure (GitHub Advisory).

Exploitability

No public proof-of-concept exploit code or in-the-wild exploitation has been reported as of the disclosure date. The EPSS score is 0.0, and the NVD SSVC assessment classifies exploitation as "none" and the vulnerability as not automatable. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires a non-default or legacy web server configuration, limiting the attack surface compared to broadly exploitable CGI vulnerabilities (GitHub Advisory, Feedly).

Exploitation steps

  1. Reconnaissance: Identify targets running php-cgi (not PHP-FPM or mod_php) in CGI or FastCGI mode with cgi.fix_pathinfo=1 (the default). Look for legacy Apache configurations using Action directives or nginx setups with custom fastcgi_split_path_info mappings, or exposed FastCGI listeners.
  2. Identify vulnerable configuration: Confirm that the web server passes inconsistent SCRIPT_FILENAME/PATH_TRANSLATED and PATH_INFO values — e.g., an Apache rewrite rule mapping a short public URL (/news/x) to a longer absolute filesystem path (/srv/site/index.php/content/articles/x).
  3. Craft malicious request: Send an HTTP request to a URL that triggers the inconsistent path mapping, such as GET /news/x HTTP/1.1, causing PHP to receive a PATH_INFO shorter than the suffix it attempts to remove from PATH_TRANSLATED.
  4. Trigger out-of-bounds access: The crafted request causes init_request_info() to compute an invalid pointer before the PATH_INFO buffer, triggering an out-of-bounds read/write. This can crash the php-cgi process (DoS) or, if the application reflects PATH_INFO or PATH_TRANSLATED in responses or logs, leak adjacent process memory.
  5. Memory disclosure (conditional): If the application returns $_SERVER['PATH_INFO'] or PATH_TRANSLATED in HTTP responses, error pages, or logs, inspect the output for leaked memory contents such as other request parameters or environment values (GitHub Advisory).

Indicators of compromise

  • Network: Repeated HTTP requests to URL paths that trigger legacy CGI rewrite rules (e.g., /news/<short_path>) resulting in HTTP 500 errors or unexpected server crashes; unusual requests to exposed FastCGI ports (typically 9000/tcp) with crafted PATH_INFO and SCRIPT_FILENAME parameters.
  • Logs: Apache or nginx access logs showing requests to rewrite-mapped URLs followed by php-cgi process crashes or 500 responses; PHP error logs containing segmentation faults or memory access violations from init_request_info().
  • Process: Unexpected termination of php-cgi worker processes; process monitoring alerts for repeated php-cgi crashes under the web server user account.
  • Application Output: HTTP responses or log entries containing garbled or unexpected values in PATH_INFO or PATH_TRANSLATED fields that include fragments of unrelated request data or environment variables (GitHub Advisory).

Mitigation and workarounds

Upgrade php-cgi to the patched versions: 8.2.36, 8.3.37, 8.4.28, or 8.5.13 depending on your branch. As an immediate workaround, set cgi.fix_pathinfo=0 in the php-cgi configuration (verify that application routing still functions correctly after this change). Additionally, correct web server mappings so that PATH_INFO and SCRIPT_FILENAME/PATH_TRANSLATED are always consistent — for Apache, rewriting to a URL path (e.g., using the [PT] flag) rather than an absolute filesystem path avoids the issue. Restrict direct access to FastCGI listeners to trusted front-end servers only (GitHub Advisory).

Community reactions

The vulnerability was disclosed on November 19, 2026, as part of a broader PHP security release covering multiple CVEs across PHP 8.2–8.5 branches. Security outlets including SecurityOnline, Infosecurity Magazine, CyberSecurityNews, and Checkmarx covered the release, with Checkmarx noting the significance of the PHP security release. Patchstack highlighted the implications for WordPress hosting environments. AlmaLinux published a dedicated blog post on the PHP security release. Community reaction was moderate, with coverage focused on the broader November 2026 PHP security release rather than this specific CVE in isolation (SecurityOnline, Infosecurity Magazine, Patchstack, Checkmarx).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

php8.2: 8.2.36-1~deb12u1

Fixed

sid

php8.4: 8.4.28-2

Fixed

trixie

php8.4: 8.4.28-1~deb13u1

Fixed

Ubuntu

Fixed

bionic (esm-infra)

php7.2: 7.2.24-0ubuntu0.18.04.17+esm15

Fixed

devel

php8.5

Affected

focal (esm-infra)

php7.4: 7.4.3-4ubuntu2.29+esm6

Fixed

jammy

php8.1: 8.1.2-1ubuntu2.29

Fixed

noble

php8.3: 8.3.6-0ubuntu0.24.04.14

Fixed

resolute

php8.5: 8.5.4-0ubuntu1.6

Fixed

trusty (esm-infra-legacy)

php5: 5.5.9+dfsg-1ubuntu4.29+esm19

Fixed

xenial (esm-infra-legacy)

php7.0: 7.0.33-0ubuntu0.16.04.16+esm23

Fixed

RHEL / CentOS

Fixed

RHEL 8

php:7.4/php.src

Affected

RHEL 9

:appstream:php-0:8.2-9080020261120141350.9.src

Fixed

RHEL 10

php8.4-0:8.4.28-1.el10_2.src

Fixed

Alpine

Fixed

edge

php83: 8.3.37-r0, 8.5.13-r0

Fixed

Source: This report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-104883HIGH7.2
  • PHP logoPHP
  • contao/core-bundle
NoYesNov 20, 2026
GHSA-vw9g-2c4c-g767MEDIUM6.8
  • PHP logoPHP
  • livewire/livewire
NoYesNov 21, 2026
CVE-2026-104882MEDIUM6.5
  • PHP logoPHP
  • cpe:2.3:a:contao:contao
NoYesNov 20, 2026
GHSA-2g6w-c7gx-fxj8MEDIUM5.4
  • PHP logoPHP
  • guzzlehttp/guzzle
NoYesNov 21, 2026
CVE-2026-104884MEDIUM5.4
  • PHP logoPHP
  • composer://contao/contao
NoYesNov 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management