PHP-FPM2Shell (CVE-2026–129289): How I Found a Critical PHP-FPM RCE
PHP-FPM incorrectly assumed that opening the php://input stream meant the request body had been fully consumed, so unread attacker-controlled bytes could remain on a reused backend connection. Under specific deployment conditions, those leftover bytes were interpreted as a new FastCGI request, allowing an attacker to forge backend parameters and execute arbitrary PHP code.
Published on medium.com
PHP
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context: PHP-FPM and the trust boundary in front of it
PHP-FPM is the FastCGI process manager that executes PHP scripts behind a web server. In a typical deployment the front end (nginx, Apache or HAProxy) receives the HTTP request, decides which routes are exposed and which script should run, and forwards the request to PHP-FPM over FastCGI. PHP-FPM then executes the selected script.
Internet
|
v
nginx / Apache / HAProxy
|
| FastCGI
v
PHP-FPM
|
v
PHP application
The separation matters because the web server is supposed to control which backend requests exist. PHP-FPM should only ever execute requests that arrived through that trusted interface.
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 is a legitimate performance optimisation, but it imposes a 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.
CVE-2026-129289 is a Critical 9.2 remote code execution vulnerability in PHP-FPM that lives exactly at that boundary. The bug dates back to PHP 5.6.0, when PHP introduced lazy handling of php://input. The author independently reported the issue, and the final advisory credits him alongside sphl and David Korczynski of Ada Logics.
Setup: what the attack needs
The vulnerability does not affect every PHP installation. The demonstrated PHP-FPM attack requires two conditions.
- The front end must reuse persistent backend connections. Relevant configurations include nginx with
fastcgi_keep_conn on, Apachemod_proxy_fcgiwithenablereuse=on, and HAProxy FastCGI deployments that retain backend connections. - The application must open
php://inputwithout consuming the entire request body. This can occur inside framework request-processing code, including paths that create the request-body stream before the application reaches its routing or authentication logic.
Standard nginx and Apache deployments that close their FastCGI connections after each request are not affected by the demonstrated request-smuggling chain. Developers do not need to write vulnerable FastCGI code themselves: ordinary framework behaviour can establish part of the vulnerable condition.
The advisory also identifies a related cleanup problem in LSAPI. That problem can desynchronise persistent LSAPI requests, but the PHP-FPM remote code execution mechanism has not been demonstrated for LSAPI, and the two impacts should not be conflated.
Finding it: an open stream is not an empty stream
The root cause is in how PHP handles php://input, the read-only stream that gives PHP applications access to the raw HTTP request body. Frameworks use it for JSON, XML, custom payloads and API requests.
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 had not. Under the right conditions, PHP could finish processing a request while leaving attacker-controlled bytes unread on the backend connection.
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.
Exploitation
HTTP request smuggling is not new: plenty of vulnerabilities come from front-end and back-end servers disagreeing about where an HTTP request begins or ends. This case is different. The second request is not another ordinary HTTP request being interpreted differently by two HTTP parsers. It is a forged FastCGI request created out of unread HTTP body data.
Step 1: send a request whose body is not fully consumed
The attacker sends one HTTP request containing data that PHP does not completely consume. The report does not include the exact request used.
Step 2: the web server forwards it to PHP-FPM
The front end passes the request to the backend over FastCGI, as it would for any legitimate request.
Step 3: PHP opens php://input but does not consume the whole body
The application (or its framework) opens the stream, and PHP reads lazily. A malformed multipart/form-data body causes the multipart parser to stop before the entire input has been consumed.
Step 4: request cleanup leaves unread bytes on the connection
Because the vulnerable implementation assumed the body had been handled, the leftover bytes are not discarded.
Step 5: the persistent backend connection is reused
The front end, configured to keep FastCGI connections alive, sends the next request over the same connection.
Step 6: PHP-FPM treats the remaining bytes as a separate FastCGI request
The leftover HTTP body data is parsed as FastCGI protocol control data. This is not a request forwarded by nginx or Apache, and not a request that passed through the web server's routing rules. It is a request the web server never sent in the first place.
Step 7: the forged backend request executes outside the front end's routing decision
The 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.
The conceptual flow, as given in the report:
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 decision
What the forged request can control
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 desynchronisation. 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 is the security boundary being crossed.
There is no memory corruption, no race condition and no ASLR bypass involved. The route from request smuggling to code execution is comparatively direct once the deployment prerequisites are present, though that does not mean it is universally easier to exploit than PHP2Shell: the prerequisites matter, in particular backend connection reuse and the vulnerable unread-body condition.
Root cause
The failure is a broken invariant in the request lifecycle. PHP must clean up unread request-body data before reusing a persistent backend connection, but the vulnerable implementation treated the existence of a php://input stream as proof that the body had been consumed. A request cannot safely finish while its unconsumed body remains available to be interpreted as backend protocol control data.
The security problem is not just that two request boundaries became confused. It is that attacker-controlled body data crossed from the data plane into the trusted backend control plane. 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 forged FastCGI request is assembled on the backend connection and never passes through those rules.
Impact
In an affected deployment the consequence is full remote code execution: an unauthenticated attacker can execute attacker-controlled PHP code with the privileges of the PHP-FPM worker. The forged request can also invoke scripts the front end never exposed, influence access-control decisions through forged request metadata such as REMOTE_ADDR, and manipulate administrator-level PHP settings through PHP_ADMIN_VALUE.
This is not a claim that every website running PHP is vulnerable to unauthenticated RCE. The exposure depends on persistent backend connection reuse and on an application leaving php://input partially unread. The right question for defenders is not simply whether they run PHP, but whether they reuse PHP backend connections and whether an application can leave php://input partially unread.
Fix
The PHP security team addressed the underlying request-cleanup behaviour. 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. The patch restores the boundary that the request lifecycle had been missing.
The security advisory was published on November 19, 2026, with fixes in the following maintained branches:
| PHP branch | First fixed version |
|---|---|
| PHP 8.2 | 8.2.36 |
| PHP 8.3 | 8.3.37 |
| PHP 8.4 | 8.4.28 |
| PHP 8.5 | 8.5.13 |
If you run PHP-FPM, update to the patched release for your branch. If you cannot 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 it is enablereuse, and other FastCGI front ends should be checked for equivalent connection reuse behaviour. Disabling backend connection reuse removes the demonstrated persistent-connection attack path while you prepare to patch.
Do not rely exclusively on application code reading php://input to completion: exceptions, failed requests and unusual shutdown behaviour can make that difficult to guarantee throughout a large application. PHP-FPM listeners should not be directly exposed to untrusted networks.
Disclosure
The author independently investigated the PHP-FPM request-lifecycle problem and submitted his findings privately to the PHP maintainers in October 2026. His investigation reproduced backend request confusion and security consequences involving request and configuration state, and the report included controlled demonstrations of cross-request response effects and execution-related behaviour. During triage the PHP team determined that the issue overlapped with an earlier private security report, and the submission was consolidated into the existing advisory.
The final published advisory credits three reporters: sphl, David Korczynski and Aviral Srivastava. The original research and validation involved other researchers, including work by Ada Logics, and the final advisory documents the arbitrary PHP execution impact. The consolidated advisory was published on November 19, 2026, under CVE-2026-129289 with a CVSS v4.0 score of 9.2 (Critical). The author thanks Jakub Zelenka (@bukka) and the PHP security team for handling the investigation, remediation and disclosure.
Variants to test
- Persistent FastCGI reuse with a partially read body. On a test deployment, enable
fastcgi_keep_conn onin nginx (orenablereuse=onwith Apachemod_proxy_fcgi) and have an application endpoint openphp://inputwithout reading it to the end. Send a malformedmultipart/form-databody and then a second request on the same connection. - Framework request objects created before routing. Look for framework code paths that construct the request-body stream before routing or authentication runs, then throw or return early. A positive result is a request that completes while the body stream was never fully consumed, with the connection still reusable.
- Forged FastCGI parameters. Where you can reproduce the smuggling primitive, attempt to set
SCRIPT_FILENAME,REMOTE_ADDRandPHP_ADMIN_VALUEin the forged request. A positive result is execution of a script the front end does not expose, an access-control decision influenced by a forged client address, or an administrator-level setting taking effect. - HAProxy FastCGI backends. Repeat the test against HAProxy deployments that retain backend connections. A positive result is the same cross-request confusion on a reused backend connection.
- LSAPI front ends. Test persistent LSAPI request handling for the related cleanup problem. A positive result is desynchronisation of persistent LSAPI requests; note that the PHP-FPM RCE mechanism has not been demonstrated for LSAPI.
- Connection-close baselines. Run the same tests against nginx and Apache configurations that close FastCGI connections after each request. A negative result there confirms the prerequisite and helps you tell a real finding from a configuration artefact.
What happened, in plain words
A security researcher named Aviral Srivastava independently reported a serious flaw in PHP, the software that runs a very large share of the world's websites. The flaw is tracked as CVE-2026-129289, and it is rated 9.2 (Critical) on a 10-point scale called CVSS. In the right setup, an attacker who has not logged in anywhere can make the server run code of their choosing. That is called remote code execution, or RCE for short.
The flaw is not a memory bug. Nothing crashes, nothing is corrupted. It is a trust problem between two pieces of software that sit next to each other: the web server in front (nginx, Apache or HAProxy) and the PHP runtime behind it (PHP-FPM). The web server is supposed to decide which requests reach PHP. In an affected setup, an attacker can sneak a request past that decision, one the web server never sent.
The bug has existed since PHP 5.6.0, when PHP introduced lazy handling of php://input. That is more than a decade. The researcher reported it privately to the PHP maintainers in October 2026, and the fix was published on November 19, 2026. The advisory credits three reporters: sphl, David Korczynski and Aviral Srivastava.

The image is the article's header, with the subtitle describing the flaw: a decade-old PHP request smuggling vulnerability that lets an unauthenticated attacker turn unread HTTP request data into an unauthorised FastCGI request and remote code execution.
The pieces involved, explained from zero
Before the flaw makes sense, you need to know what the moving parts are. None of them is unusual; almost every website you visit uses them.
HTTP is the language a browser and a website speak. When you type an address and press Enter, your browser sends an HTTP request: a few lines of text saying what you want, sometimes followed by a body, which is extra data such as a filled-in form or a JSON document.
A web server is the program that receives those requests first. nginx, Apache and HAProxy are common ones. Think of it as the receptionist of a building: it checks who is allowed in, decides which department a visitor should go to, and only then lets them through.
PHP is a programming language used to build websites. WordPress, many content management systems and countless custom applications are written in it. When a browser asks for a page, some PHP code runs on the server and produces the page.
PHP-FPM is the program that actually runs PHP code. It is the worker in the back office. The receptionist (web server) hands it a job, and it does the job.
FastCGI is the private language the web server and PHP-FPM use to talk to each other. It is not HTTP. It is an internal protocol, and it carries more than the visitor's request: it also tells PHP which file to run, what the visitor's address is, and which PHP settings apply. Think of it as the internal memo the receptionist writes for the back office, on a form the visitor never sees.
A persistent connection is a phone line that stays open instead of being hung up after every call. Opening a new connection for every single request is slow, so the web server often keeps the line to PHP-FPM open and reuses it. This is a normal performance trick, and it is central to the bug.
A request body is the data that comes with a request, for example the contents of a form you submit. PHP gives applications a way to read that body: a stream called php://input. A stream here simply means a channel you can read data from, like a tap you can open. The important detail is that opening the tap does not mean you have drunk all the water. PHP reads the body lazily, only as the application asks for it.
Request smuggling is a class of bug where two pieces of software disagree about where one request ends and the next begins. The attacker slips extra data into the gap, and the second piece of software treats it as a new request. You can picture a queue at a counter: if the person at the front leaves a bag on the counter, the next customer may be handed it as if it were theirs.
Remote code execution means the attacker gets their own code running on the server. It is usually the worst outcome of a web vulnerability, because from there the attacker can read data, change it, or move further into the network.
The setup: how a normal PHP site is built
A typical deployment looks like this:
Internet
|
v
nginx / Apache / HAProxy
|
| FastCGI
v
PHP-FPM
|
v
PHP application
Line by line:
Internetis where the visitor is, with a browser.- The arrow down to
nginx / Apache / HAProxymeans the visitor's HTTP request reaches the web server first. - The next arrow, labelled
FastCGI, means the web server forwards the request to PHP-FPM using that internal protocol. PHP-FPMreceives the forwarded request and runs the PHP code.- The last arrow means the PHP application produces the result, which travels back to the visitor.
Why this matters: the web server is the gatekeeper. It decides which pages exist, which ones require a login, and which script should run. PHP-FPM is supposed to execute only what the gatekeeper hands it. That is the trust boundary the whole story is about.
FastCGI also supports persistent connections, as described above. That is legitimate, but it comes with one rule: before PHP-FPM handles another request on the same connection, PHP must finish reading the previous request, or the connection must be closed. If neither happens, the end of one request and the start of the next become ambiguous, and that is exactly where this vulnerability lives.
What the attack needs
Not every PHP site is affected. The demonstrated attack needs two conditions at the same time.
- The web server must reuse backend connections. In nginx that means the setting
fastcgi_keep_conn on. In Apache withmod_proxy_fcgiit meansenablereuse=on. HAProxy deployments that keep FastCGI backend connections open also qualify. - The application must open
php://inputwithout reading the whole body. This can happen inside a framework's own request-handling code, including code that creates the body stream before routing or login checks run.
Sites whose web server closes the FastCGI connection after every request are not affected by the demonstrated chain. And developers do not have to write broken FastCGI code themselves: ordinary framework behaviour can create part of the condition.
The advisory also mentions a related cleanup problem in LSAPI, another protocol used to run PHP. That problem can desynchronise persistent LSAPI requests, but the PHP-FPM remote code execution has not been demonstrated for LSAPI. The two should not be mixed up.
Finding it: an open stream is not an empty stream
The root cause is in how PHP handles php://input, the read-only stream that gives applications the raw request body. Frameworks use it to read JSON, XML, custom payloads and API requests. An API is simply a way for one program to talk to another over HTTP, usually exchanging data rather than web pages.
The subtle part: opening the stream does not mean PHP has read the whole body. PHP reads it lazily. That matters because PHP has to clean up any unread body data before reusing a persistent backend connection.
The vulnerable implementation treated the mere existence of a php://input stream as proof that the body had already been dealt with. It had not. Under the right conditions, PHP could finish a request while attacker-controlled bytes were still sitting unread on the backend connection.
Add a malformed multipart/form-data body. multipart/form-data is the format browsers use to upload files and send forms with several parts. A malformed one can make PHP's multipart parser stop before it has consumed all the input. The result is a request that looks finished to PHP, while the connection still holds bytes belonging to it. Those bytes should be thrown away. In an affected PHP-FPM setup, they can instead become the start of another FastCGI request.
How request smuggling becomes remote code execution
Request smuggling is not new. Many bugs come from a front-end and a back-end disagreeing about where a request starts or ends. This case is different: the second request is not an ordinary HTTP request read differently by two parsers. It is a forged FastCGI request built out of unread HTTP body data.
Step 1: send a request whose body is not fully consumed
The attacker sends one HTTP request containing data that PHP does not completely consume. The report does not include the exact request used.
Why this step: the attacker needs leftover bytes on the connection. If PHP reads everything, there is nothing left to abuse.
Step 2: the web server forwards it to PHP-FPM
The front end passes the request to the backend over FastCGI, as it would for any legitimate request.
Why this step: the attacker does not talk to PHP-FPM directly. The web server does it for them, which is what makes the attack reachable from the internet.
Step 3: PHP opens php://input but does not consume the whole body
The application, or its framework, opens the stream, and PHP reads lazily. A malformed multipart/form-data body makes the multipart parser stop before the entire input has been consumed.
Why this step: this is the moment the leftover bytes are created. The application believes it has what it needs and moves on.
Step 4: request cleanup leaves unread bytes on the connection
Because the vulnerable implementation assumed the body had been handled, the leftover bytes are not discarded.
Why this step: cleanup is the safety net. Here the net has a hole, and the bytes stay on the connection.
Step 5: the persistent backend connection is reused
The front end, configured to keep FastCGI connections alive, sends the next request over the same connection.
Why this step: without reuse, the connection would be closed and the leftover bytes would disappear with it. Reuse is what carries them forward.
Step 6: PHP-FPM treats the remaining bytes as a separate FastCGI request
The leftover HTTP body data is parsed as FastCGI protocol control data. This is not a request forwarded by nginx or Apache, and not a request that passed through the web server's routing rules. It is a request the web server never sent in the first place.
Why this step: this is the heart of the bug. PHP-FPM cannot tell the difference between a real FastCGI request from the web server and leftover bytes that look like one.
Step 7: the forged backend request executes outside the front end's routing decision
The forged request can change PHP configuration, bypass front-end routing restrictions, and run attacker-controlled PHP code with the privileges of the PHP-FPM worker.
Why this step: the gatekeeper is skipped entirely. The forged request never passes the receptionist, so none of the receptionist's rules apply.
The conceptual flow, as given in the report:
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 decision
Line by line:
- Step 1 is the attacker's single HTTP request, the only thing they send to the public web server.
- Step 2 is the normal forwarding to PHP-FPM.
- Step 3 is where the body is only partly read.
- Step 4 is where the unread bytes survive cleanup.
- Step 5 is the reused connection carrying those bytes forward.
- Step 6 is PHP-FPM misreading them as a new FastCGI request.
- Step 7 is the forged request running without the web server's routing rules ever applying.
What the forged request can control
FastCGI parameters tell PHP which script to run, what the request environment looks like, and which PHP settings apply. Some of those values normally come from trusted web-server configuration, not from an outside visitor. The published advisory confirms that the forged request can control parameters such as SCRIPT_FILENAME, REMOTE_ADDR and PHP_ADMIN_VALUE.
What those mean:
SCRIPT_FILENAMEis the path of the PHP file to execute. Controlling it means choosing which script runs, including one the web server never exposed.REMOTE_ADDRis the visitor's address as PHP sees it. Applications often use it for access decisions, so forging it can influence those decisions.PHP_ADMIN_VALUElets you set PHP configuration values at administrator level, which can change how the runtime behaves.
The consequences go well beyond ordinary request desynchronisation. The attacker may be able to run a PHP script the front end never exposed, influence access-control decisions through forged request metadata, or change administrator-level PHP settings. The advisory also documents a path to running 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 them at all. That is the security boundary being crossed.
There is no memory corruption, no race condition and no ASLR bypass here. Memory corruption means damaging a program's memory so it misbehaves. A race condition is a bug that depends on two things happening at almost the same moment. ASLR is a defence that randomises where things sit in memory to make memory attacks harder. None of that is needed: once the deployment conditions are present, the route from smuggling to code execution is comparatively direct. That does not make it universally easier to exploit than PHP2Shell, a separate pair of PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619, which involved fatal errors, memory state and request cleanup and were reported as exploited in the wild. The prerequisites matter here, especially connection reuse and the unread-body condition.
Root cause
The failure is a broken invariant in the request lifecycle. An invariant is a rule that must always hold for the system to be safe. Here the rule is: PHP must clean up unread body data before reusing a persistent backend connection. The vulnerable implementation treated the existence of a php://input stream as proof that the body had been consumed. A request cannot safely finish while its unconsumed body is still available to be read as backend protocol control data.
The security problem is not just that two request boundaries got confused. It is that attacker-controlled body data crossed from the data plane into the trusted backend control plane. In plain terms: data meant to be content became instructions. The web server believed it had forwarded one request, PHP finished processing that request, but the connection still held data belonging to it, and that data was allowed to become control information for the next request.
The forged FastCGI request is assembled on the backend connection and never passes through those rules.
Impact
In an affected deployment the result is full remote code execution: an unauthenticated attacker can run attacker-controlled PHP code with the privileges of the PHP-FPM worker. Unauthenticated means without logging in or holding any account. The forged request can also run scripts the front end never exposed, influence access-control decisions through forged metadata such as REMOTE_ADDR, and change administrator-level PHP settings through PHP_ADMIN_VALUE.
This is not a claim that every PHP website is vulnerable to unauthenticated RCE. Exposure depends on persistent backend connection reuse and on an application leaving php://input partly unread. The right question for defenders is not simply whether they run PHP, but whether they reuse PHP backend connections and whether an application can leave php://input partly unread.
Fix
The PHP security team addressed the underlying request-cleanup behaviour. PHP now checks whether the request body has actually been consumed, instead of assuming that opening php://input means its contents were handled. PHP-FPM also closes the connection when the preceding FastCGI input record is incomplete, instead of letting leftover bytes be read as another request. The patch restores the boundary the request lifecycle was missing.
The advisory was published on November 19, 2026, with fixes in these maintained branches:
| PHP branch | First fixed version |
|---|---|
| PHP 8.2 | 8.2.36 |
| PHP 8.3 | 8.3.37 |
| PHP 8.4 | 8.4.28 |
| PHP 8.5 | 8.5.13 |
If you run PHP-FPM, update to the patched release for your branch. If you cannot update immediately, check whether your web server uses persistent FastCGI connections: for nginx the setting is fastcgi_keep_conn, for Apache mod_proxy_fcgi it is enablereuse, and other FastCGI front ends should be checked for equivalent connection reuse. Turning off backend connection reuse removes the demonstrated persistent-connection attack path while you prepare to patch.
Do not rely only on application code reading php://input to the end: exceptions, failed requests and unusual shutdown behaviour can make that hard to guarantee across a large application. And PHP-FPM listeners should never be directly exposed to untrusted networks.
Disclosure
The researcher investigated the PHP-FPM request-lifecycle problem independently and submitted his findings privately to the PHP maintainers in October 2026. His investigation reproduced backend request confusion and security consequences involving request and configuration state, and the report included controlled demonstrations of cross-request response effects and execution-related behaviour. During triage the PHP team found the issue overlapped with an earlier private report, and the submission was merged into the existing advisory. Triage is the first pass where maintainers sort and assess incoming reports.
The final advisory credits three reporters: sphl, David Korczynski and Aviral Srivastava. The original research and validation involved other researchers, including work by Ada Logics, and the final advisory documents the arbitrary PHP execution impact. The consolidated advisory was published on November 19, 2026, under CVE-2026-129289 with a CVSS v4.0 score of 9.2 (Critical). The researcher thanks Jakub Zelenka (@bukka) and the PHP security team for handling the investigation, remediation and disclosure.
Variants to test
These are checks a defender or researcher can run on their own systems to see whether they are exposed. Each one is a test, not an attack on someone else's site.
- Persistent FastCGI reuse with a partly read body. On a test deployment, enable
fastcgi_keep_conn onin nginx, orenablereuse=onwith Apachemod_proxy_fcgi, and have an application endpoint openphp://inputwithout reading it to the end. Send a malformedmultipart/form-databody and then a second request on the same connection. - Framework request objects created before routing. Look for framework code that builds the request-body stream before routing or authentication runs, then throws or returns early. A positive result is a request that completes while the body stream was never fully consumed, with the connection still reusable.
- Forged FastCGI parameters. Where you can reproduce the smuggling primitive, try to set
SCRIPT_FILENAME,REMOTE_ADDRandPHP_ADMIN_VALUEin the forged request. A positive result is a script the front end does not expose being run, an access-control decision influenced by a forged client address, or an administrator-level setting taking effect. - HAProxy FastCGI backends. Repeat the test against HAProxy deployments that keep backend connections. A positive result is the same cross-request confusion on a reused backend connection.
- LSAPI front ends. Test persistent LSAPI request handling for the related cleanup problem. A positive result is desynchronisation of persistent LSAPI requests; note that the PHP-FPM RCE has not been demonstrated for LSAPI.
- Connection-close baselines. Run the same tests against nginx and Apache setups that close FastCGI connections after each request. A negative result there confirms the prerequisite and helps you tell a real finding from a configuration artefact.
Glossary
- API: a way for one program to talk to another over HTTP, usually exchanging data rather than web pages.
- ASLR: a defence that randomises where things sit in memory, making memory attacks harder.
- Body: the extra data sent with an HTTP request, such as a form submission or a JSON document.
- CVE: a public identifier for a known security vulnerability.
- CVSS: a scoring system that rates the severity of a vulnerability, here 9.2 out of 10, Critical.
- FastCGI: the internal protocol a web server uses to pass requests to PHP-FPM.
- Framework: a reusable code base that applications are built on, which handles common tasks such as reading requests.
- HTTP: the language browsers and websites use to exchange requests and responses.
- Invariant: a rule that must always hold for a system to be safe.
- LSAPI: another protocol used to run PHP, mentioned in the advisory for a related cleanup problem.
- Memory corruption: damaging a program's memory so that it misbehaves.
- multipart/form-data: the format browsers use to send forms with several parts, including file uploads.
- Persistent connection: a connection kept open and reused for several requests instead of being closed after each one.
- PHP: a programming language widely used to build websites.
- PHP-FPM: the program that runs PHP code behind a web server.
- php://input: a read-only stream that gives PHP applications the raw request body, read lazily.
- Race condition: a bug that depends on two things happening at almost the same moment.
- RCE (remote code execution): an attacker getting their own code to run on a server.
- Request smuggling: a class of bug where two pieces of software disagree about where one request ends and the next begins, letting extra data be read as a new request.
- Stream: a channel you can read data from, like a tap you can open.
- Triage: the first pass where maintainers sort and assess incoming security reports.
- Unauthenticated: without logging in or holding any account.
- Web server: the program that receives HTTP requests first and decides what is allowed, such as nginx, Apache or HAProxy.