PHP-FPM CVE-2026-129289: Pre-Authentication RCE via Request Smuggling over Persistent Backend Connections
1. Basic Information Article Title: PHP 8.5.13 Release Announcement Publisher: PHP Development Team Release Date: November 19, 2026 Source: PHP 8.5.13 Official Release Related Resources: PHP 8 ChangeLog, CVE-202
1. Basic Information
- Article Title: PHP 8.5.13 Release Announcement
- Publisher: PHP Development Team
- Release Date: November 19, 2026
- Source: PHP 8.5.13 Official Release
- Related Resources: PHP 8 ChangeLog, CVE-2026-129289 Official GHSA, CVE-2026-129474 GHSA, CVE-2026-129496 GHSA, CVE-2026-126714 GHSA, CVE-2026-115560 GHSA, CVE-2026-129291 GHSA, CVE-2026-128090 GHSA, PHP 2026 News, BleepingComputer: PHP Security Updates Report
- Related CVEs: CVE-2026-129289, CVE-2026-129474, CVE-2026-129496, CVE-2026-126714, CVE-2026-115560, CVE-2026-129291, CVE-2026-128090
- Affected Products: PHP-FPM, PHP 8.2, PHP 8.3, PHP 8.4, PHP 8.5
- Severity: Critical (Author's handling priority)
- Reason for Severity: A critical issue leading to pre-authentication RCE. However, standard non-persistent NGINX/Apache configurations are not affected by this specific path.
2. In Brief
This issue allows execution of PHP code under worker privileges by reusing backend connections to PHP-FPM and sending crafted request bodies that are interpreted as separate FastCGI requests in scenarios where the application opens php://input without reading the entire body. For LSAPI, however, the official GHSA describes request-stream desynchronization and disruption of subsequent requests; the same RCE path has not been established.
3. Attack Flow
The following attack flow targets the PHP-FPM path of CVE-2026-129289 (refer to "6. Success and Failure Conditions" for prerequisites). The other six vulnerabilities are independent issues and cannot be mitigated solely by disabling connection reuse.
CVE-2026-129289: Independent Attack Vector Utilizing PHP-FPM Connection Reuse
- Send a crafted multipart request body to a PHP-FPM endpoint with connection reuse enabled.
- Traverse an application path that opens
php://inputwithout reading the entire body, leaving unread bytes after the request completes. - Upon connection reuse, cause the remaining bytes to be interpreted as an independent FastCGI request.
- Specify an existing PHP script path and modify PHP configuration settings using forged FastCGI parameters.
- Execute the input of the forged request as PHP code under worker privileges.
4. Attacker Position and Execution Location
A pre-authentication remote attacker who can reach a PHP-FPM route with connection reuse enabled. Note that this RCE vector is specific to PHP-FPM, and unread body issues in LSAPI are evaluated separately.
5. Indicators Observed by Victims and Administrators
May manifest as service disruptions, authentication anomalies, configuration tampering, and unauthorized data access. Administrators review requests, processes, files, and account changes across the same timeline.
6. Success and Failure Conditions
Success Conditions
- Connection reuse enabled for PHP-FPM
- Unpatched PHP version
- Processing paths that do not fully read the request body (the application opens
php://inputwithout reading to the end)
Failure and Mitigation Conditions
- PHP versions 8.2.36 or later for 8.2.x, 8.3.37 or later for 8.3.x, 8.4.28 or later for 8.4.x, and 8.5.13 or later for 8.5.x
- Closing backend connections per request
- Standard non-persistent connection configurations
In addition to the success conditions above, this RCE vector requires knowing the path of an existing PHP script. Note that connection reuse corresponds to settings such as NGINX's fastcgi_keep_conn on or Apache's enablereuse=on.
7. What Happens Upon Success
- Frontend routing bypass
- Execution of arbitrary PHP code under FPM worker privileges
- Theft of sensitive information and deployment of web shells
8. Observable Logs
- Discrepancies in request counts and URIs between frontend access logs and FPM access logs
- Unexpected FastCGI requests on the same backend connection
- Initiation of shells or network utilities from FPM child processes
In configurations where FPM access logs are enabled and required fields are recorded, correlate processing records between the frontend and FPM. Discrepancies serve as a starting point for investigation and do not indicate successful compromise on their own. Confirming FastCGI requests on the backend requires separate communication records. Note that according to official PHP configuration specifications, the default value for FPM's access.log is unset.
9. Attack Success Determination
- Attempt: Crafted requests to vulnerable endpoints or protocols.
- Execution: Generation of unexpected processes, accounts, files, or commands.
- Impact: Data access, privilege acquisition, persistence, service disruption.
- Attempt logs alone do not confirm a successful compromise.
- Crafted HTTP requests or frontend-FPM processing mismatches alone do not determine successful PHP code execution. This is determined when forged FastCGI requests and the execution of attacker-controlled PHP code are substantiated by acquired execution records.
10. Investigation Playbook
- Verify version, configuration, patch status, and external reachability.
- Preserve raw logs, process trees, file metadata, and changes to accounts or credentials.
- Correlate events chronologically from crafted requests to code execution and privilege acquisition.
- Search all assets for lateral movement, data access, and outbound communications.
- Isolate and update targets, and rotate related credentials and tokens.
11. Defense and Detection Ideas
- Single Event: Discrepancies in request counts and URIs between frontend access logs and FPM access logs
- Timeline: Correlate anomalous requests with subsequent process or account modifications.
- Hunting: Cross-search for identical IOCs, source IPs, accounts, and file hashes.
- Priority Action: Update to PHP 8.2.36, 8.3.37, 8.4.28, or 8.5.13. If immediate updating is not possible, disable backend connection reuse.
12. Facts / Inference / Hypothesis
Facts
- The official GHSA identifies PHP 8.2.36, 8.3.37, 8.4.28, and 8.5.13 as patched versions.
- The issue is triggered by combining unread request bodies with the reuse of persistent connections.
- Standard non-persistent connection NGINX/Apache configurations are not affected by this path.
- Nature of the other six issues (per respective official GHSAs):
- CVE-2026-129474: Use-After-Free and RCE via magic method backtrace (requires PHP 8.5, fatal error backtrace settings, and application paths)
- CVE-2026-129496: Timezone cache Use-After-Free and potential RCE (involves startup diagnostics, PHP file error logs, and early request initialization)
- CVE-2026-126714: RCE from partially overwritten session files (requires session content manipulation, interrupted writes, and appropriate gadget chains)
- CVE-2026-115560: RCE from session serializer mismatch (requires upload progress, conditions reading/writing the same session in different formats, and gadget chains)
- CVE-2026-129291: Local privilege escalation via FPM epoll Use-After-Free (requires PHP execution within workers, epoll backend,
catch_workers_outputenabled, etc. Privileges obtained are those of the FPM master and do not indicate container escape on their own) - CVE-2026-128090: Bypass of PHAR OpenSSL signature verification (requires archive modification and does not use the same pre-auth HTTP path)
Inference
- Assessing impact requires verifying backend connection reuse settings in addition to the software version.
Hypothesis
- None. Attack scope and victim counts beyond publicly disclosed information are not asserted.
13. MITRE ATT&CK Mapping
| ID | Technique | Confidence | Basis |
|---|---|---|---|
| T1190 | Exploit Public-Facing Application | high | Addressing public web paths for CVE-2026-129289. This does not indicate observed active exploitation |
14. Unknowns and Additional Investigation
- Presence of active exploitation in real environments
- Endpoints where request bodies remain unread across various frameworks
15. Impact on SOCs and Organizations
Verify the correspondence between frontend access logs and FPM access logs, and track unexpected additional FastCGI request processing along with subsequent PHP file creation and shell initiation.
16. Summary by Role
- SOC: Verify the correspondence between frontend access logs and FPM access logs, and track unexpected additional FastCGI request processing along with subsequent PHP file creation and shell initiation.
- Administrators: Update to PHP 8.2.36, 8.3.37, 8.4.28, or 8.5.13. If immediate updating is not possible, disable backend connection reuse.
- Users: There are no workarounds available on the end-user side; administrator updates and compromise verification are required.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.