November 19, 2026
CVE-2026β129289: How I Found a Critical PHP-FPM Request Smuggling RCE Hidden Since PHP 5.6
One HTTP request. A second FastCGI request the web server never authorized. How a decade-old PHP bug can turn unread request body data intoβ¦

By Aviral Srivastava
8 min read
One HTTP request. A second FastCGI request the web server never authorized. How a decade-old PHP bug can turn unread request body data into unauthenticated remote code execution.
PHP just released fixes for a vulnerability I've been independently investigating, and this one is particularly interesting.
CVE-2026β129289 is a Critical 9.2 remote code execution vulnerability in PHP-FPM. I independently reported the issue, and the final advisory credits me alongside the researchers involved in the earlier report, including David Korczynski of Ada Logics.
The bug dates back to PHP 5.6.0, when PHP introduced lazy handling of php://input. That was over a decade ago.
And the actual failure is surprisingly simple.
An attacker sends an HTTP request containing data that PHP doesn't completely consume. Under certain conditions, when the backend connection is reused, PHP-FPM interprets the leftover bytes as an entirely new FastCGI request.
Not a request forwarded by nginx or Apache.
Not a request that passed through the web server's routing rules.
A request the web server never sent in the first place.
That forged request can manipulate PHP configuration, bypass front-end routing restrictions, and execute attacker-controlled PHP code with the privileges of the PHP-FPM worker.
No memory corruption. No race condition. No ASLR bypass.
Just a broken trust boundary between the web server and the PHP runtime.
The important caveat is that not every PHP installation is affected. The attack requires persistent backend connections and specific request-body handling behavior. I'll explain those conditions below.
But in an affected deployment, the consequence is full remote code execution.
The Target: PHP-FPM
PHP doesn't need much introduction. It powers a significant portion of the web, from WordPress installations and content management systems to custom applications and enterprise platforms.
What matters for this vulnerability is how PHP processes requests.
A common deployment looks like this:
Internet
|
v
nginx / Apache / HAProxy
|
| FastCGI
v
PHP-FPM
|
v
PHP applicationInternet
|
v
nginx / Apache / HAProxy
|
| FastCGI
v
PHP-FPM
|
v
PHP applicationThe web server receives the HTTP request. It decides which requests are allowed, which routes are exposed, what backend script should execute, and what information PHP should receive about the client.
PHP-FPM then executes the selected PHP script.
This separation is important.
The web server is supposed to control which backend requests exist. PHP-FPM should execute the requests it receives through that trusted interface.
But FastCGI also supports persistent connections.
Instead of opening and closing a backend connection for every request, the front end can reuse an existing connection to PHP-FPM.
That's a perfectly legitimate performance optimization.
It also creates one very important requirement:
Before processing another request on the same connection, PHP must finish consuming the previous request or close the connection.
Otherwise, the boundary between two requests becomes ambiguous.
And that's exactly where this vulnerability lives.
The Bug: PHP Thought the Request Body Was Already Handled
The root cause is in how PHP handles php://input.
For anyone unfamiliar with it, php://input is a read-only stream that gives PHP applications access to the raw HTTP request body.
Frameworks use it for JSON, XML, custom payloads, API requests, and other input formats.
The subtle part is that opening this stream does not mean PHP has read the entire request body.
PHP reads the contents lazily.
That distinction matters because PHP must clean up any unread request-body data before reusing a persistent backend connection.
The vulnerable implementation incorrectly treated the existence of a php://input stream as evidence that the request body had already been dealt with.
It hadn't.
Under the right conditions, PHP could finish processing a request while leaving attacker-controlled bytes unread on the backend connection.
Now combine that with a malformed multipart/form-data body that makes PHP's multipart parser stop before the entire input has been consumed.
The result is a request that appears finished to PHP's request lifecycle, even though the backend connection still contains bytes belonging to that request.
Those bytes should be discarded.
Instead, in an affected PHP-FPM deployment, they can become the beginning of another FastCGI request.
That's the vulnerability.
How Request Smuggling Becomes Remote Code Execution
HTTP request smuggling isn't new. We've seen plenty of vulnerabilities caused by front-end and back-end servers disagreeing about where an HTTP request begins or ends.
But this case is different.
The second request isn't another ordinary HTTP request being interpreted differently by two HTTP parsers.
It's a forged FastCGI request created out of unread HTTP body data.
Here's the conceptual flow:
1. Attacker sends one HTTP request
|
v
2. Web server forwards it to PHP-FPM
|
v
3. PHP opens php://input
but doesn't consume the whole body
|
v
4. Request cleanup leaves unread bytes
|
v
5. Persistent backend connection is reused
|
v
6. PHP-FPM treats the remaining bytes
as a separate FastCGI request
|
v
7. The forged backend request executes
outside the front end's routing decision1. Attacker sends one HTTP request
|
v
2. Web server forwards it to PHP-FPM
|
v
3. PHP opens php://input
but doesn't consume the whole body
|
v
4. Request cleanup leaves unread bytes
|
v
5. Persistent backend connection is reused
|
v
6. PHP-FPM treats the remaining bytes
as a separate FastCGI request
|
v
7. The forged backend request executes
outside the front end's routing decisionThe really interesting part is what FastCGI allows the backend request to specify.
FastCGI parameters tell PHP which script to execute, what the request environment looks like, and which relevant PHP settings apply.
Some of those values ordinarily come from trusted web-server configuration rather than directly from an external HTTP client.
The published advisory confirms that the forged request can control parameters such as SCRIPT_FILENAME, REMOTE_ADDR, and PHP_ADMIN_VALUE.
That creates consequences far beyond ordinary request desynchronization.
The attacker may be able to invoke a PHP script that the front end never exposed, influence application access-control decisions through forged request metadata, or manipulate administrator-level PHP settings.
The advisory also documents a path to executing attacker-controlled PHP code through the PHP-FPM worker.
The web server can have perfectly reasonable routing and access restrictions, and the forged FastCGI request never goes through those restrictions at all.
That's the security boundary being crossed.
Why This Is Different From PHP2Shell
If you've been following recent PHP security news, you've probably heard of PHP2Shell.
PHP2Shell refers to two critical vulnerabilities, CVE-2026β109618 and CVE-2026β109619, involving PHP's handling of fatal errors, memory state, and request cleanup.
Those vulnerabilities attracted major attention, including reports of exploitation in the wild.
My new CVE is different.
CVE-2026β129289 does not depend on exploiting corrupted heap metadata, defeating ASLR, or constructing a memory-corruption exploit chain.
It abuses a protocol and request-lifecycle failure.
Once the vulnerable deployment prerequisites are present, the route from request smuggling to code execution is comparatively direct.
That doesn't mean it's universally easier to exploit than PHP2Shell.
The prerequisites matter. In particular, backend connection reuse must be enabled, and the application must reach the vulnerable unread-body condition.
But I find the underlying issue particularly interesting because there is no memory-safety exploit to develop.
A performance feature, a lazily consumed stream, and one incorrect cleanup decision are enough to undermine the web server's authority over PHP-FPM.
Sometimes the most dangerous security bugs aren't complicated.
They're assumptions that remain true almost everywhere, except on the one execution path nobody thought to check.
Who Is Actually Vulnerable?
This is the part I want to make especially clear.
CVE-2026β129289 does not mean every website running PHP is vulnerable to unauthenticated RCE.
The demonstrated PHP-FPM attack requires two conditions.
First, the front end must reuse persistent backend connections. Relevant configurations include nginx with fastcgi_keep_conn on, Apache mod_proxy_fcgi with enablereuse=on, and HAProxy FastCGI deployments that retain backend connections.
Second, the application must open php://input without consuming the entire request body.
The latter condition can occur inside framework request-processing code, including paths that create the request-body stream before the application reaches its routing or authentication logic.
That is what makes this worth examining beyond custom PHP applications.
Developers don't necessarily need to write vulnerable FastCGI code themselves. Ordinary framework behavior can establish part of the vulnerable condition.
However, standard nginx and Apache deployments that close their FastCGI connections after each request are not affected by the demonstrated PHP-FPM request-smuggling chain.
The advisory also identifies a related cleanup problem in LSAPI.
That problem can desynchronize persistent LSAPI requests, but the PHP-FPM remote code execution mechanism has notbeen demonstrated for LSAPI. The two impacts shouldn't be conflated.
The right question for defenders is not simply, "Do we run PHP?"
It's:
"Do we reuse PHP backend connections, and can an application leave php://input partially unread?"
That is the exposure worth investigating.
What I Found and How the Report Was Handled
I independently investigated the PHP-FPM request-lifecycle problem and submitted my findings privately to the PHP maintainers in October 2026.
My investigation reproduced backend request confusion and security consequences involving request and configuration state. The report also included controlled demonstrations of cross-request response effects and execution-related behavior.
During triage, the PHP team determined that the issue overlapped with an earlier private security report.
My submission was therefore consolidated into the existing advisory.
That is an important distinction, and I want to be clear about it.
I independently reported the vulnerability, but I was not the only person to submit this root cause.
The final published advisory credits three reporters:
- sphl
- David Korczynski
- Aviral Srivastava
The original research and validation involved other researchers, including work by Ada Logics. The final security advisory documents the arbitrary PHP execution impact.
I appreciate that the PHP maintainers recognized the independent research and included my reporter credit in the consolidated advisory rather than treating an overlapping report as having no contribution.
That's how coordinated vulnerability research should work.
Multiple researchers can arrive at the same underlying security failure through different paths. What matters is that the maintainers get enough evidence to understand the issue, validate its consequences, and fix it properly.
The Fix: Don't Trust an Open Stream to Mean an Empty Stream
The PHP security team addressed the underlying request-cleanup behavior.
The important change is that PHP now determines whether the request body has actually been consumed, rather than assuming that opening php://input means its contents have been handled.
PHP-FPM also closes the connection when the preceding FastCGI input record is incomplete, instead of allowing leftover bytes to be interpreted as another request.
That's a meaningful fix because the problem was not simply one malformed multipart request.
The underlying failure was a broken invariant in the request lifecycle.
A request cannot safely finish while its unconsumed body remains available to be interpreted as backend protocol control data.
The patch restores that boundary.
Patched PHP Versions: What You Need to Update
The security advisory was published on November 19, 2026, with fixes available in the following maintained PHP branches:
PHP branchFirst fixed versionPHP 8.28.2.36PHP 8.38.3.37PHP 8.48.4.28PHP 8.58.5.13
If you're running PHP-FPM, I recommend updating to the patched release for your branch.
If you can't update immediately, review whether your web server uses persistent FastCGI connections.
For nginx, the relevant setting is fastcgi_keep_conn. For Apache mod_proxy_fcgi, review enablereuse. Other FastCGI front ends should be checked for equivalent connection reuse behavior.
Disabling backend connection reuse removes the demonstrated persistent-connection attack path while you prepare to patch.
I would not rely exclusively on application code reading php://input to completion. Exceptions, failed requests, and unusual shutdown behavior can make that difficult to guarantee throughout a large application.
And as always, PHP-FPM listeners should not be directly exposed to untrusted networks.
The Bigger Security Lesson
The thing I keep noticing in vulnerability research is how often the real failure exists between components that are individually doing something reasonable.
The web server is responsible for HTTP routing and access control.
FastCGI provides a protocol for communicating with the PHP runtime.
PHP-FPM executes scripts.
php://input exposes request-body data to the application.
Persistent connections improve performance.
None of those features is inherently a vulnerability.
The failure appears when the system assumes that one component has finished doing its job, even though the state it leaves behind is still meaningful to another component.
In this case, the web server believed it had forwarded one request.
PHP finished processing that request.
But the backend connection still contained data belonging to it.
And that data was allowed to become control information for the next request.
The security problem is not just that two request boundaries became confused.
It's that attacker-controlled body data crossed from the data plane into the trusted backend control plane.
That's why I find CVE-2026β129289 so interesting.
It turns a mundane request-cleanup mistake, introduced more than a decade ago, into a Critical remote code execution vulnerability under the right deployment conditions.
No sophisticated memory exploit required.
Just one assumption about what it means for a request to be finished.
Responsible Disclosure and Acknowledgments
I privately reported my independent findings in October 2026 and coordinated through the PHP security advisory process.
After the maintainers linked the report to the earlier submission, I was added as a credited reporter.
The PHP security team published the consolidated advisory on November 19, 2026, under CVE-2026β129289, with a CVSS v4.0 score of 9.2 (Critical).
I want to thank Jakub Zelenka (@bukka) and the PHP security team for handling the investigation, remediation, and disclosure.
Credit also goes to sphl, David Korczynski, and the researchers at Ada Logics for their work on the vulnerability.
The important result is that a long-standing PHP security boundary has now been fixed.
References
Official PHP Security Advisory: GHSA-qc49-hpvq-g2w6
The Hacker News article: https://thehackernews.com/2026/11/php-fixes-7-critical-flaws-including.html
CVE: CVE-2026β129289
PHP Security Releases: Official PHP 8 Changelog
Related PHP2Shell Research: Palo Alto Networks Unit 42: CVE-2026β109618 and CVE-2026β109619