CVE-2026-109618 / CVE-2026-109619 · CVSS 4.0 9.2 · PHP core remote code execution
| Part headers | Wire | 8.4.26 peak | 8.4.27 peak | Outcome |
|---|
Values between the measured points are linearly interpolated; values beyond the last measured point are extrapolated along the final slope. Patched builds were flat at 2 MiB across every payload tested.
Stage 1 ends with the request dying. Stage 2 asks what the next request on that
worker receives. Session upload progress runs during request startup, before any application code,
and PHP echoes the session id back in Set-Cookie — so if the id is read out of
recycled memory, the response itself carries the result. Measured on
php:8.4.26-fpm-alpine3.23 / 8.4.27-fpm-alpine3.23 as
php -S with 4 workers.
| Condition | Session id length | Outcome |
|---|---|---|
| 8.4.26 · fresh worker | 32 B, all 8 | clean |
| 8.4.26 · after one OOM | 8 B in 18–20 of 20 | stale memory read |
| 8.4.26 · after one OOM, heap producer geometry | no id in 7–10 of 10 | corrupted allocation size |
| 8.4.27 · after the same payload | 32 B, all 20 | clean — producer never exhausts memory |
The fresh-worker row is the control that makes the rest mean something: without a preceding OOM the same request shapes are completely clean. Literal bytes observed:
fresh worker : PHPSESSID=7008ad13f65794ab4624eacca122d8b4after one OOM: PHPSESSID=%01%00%00%00%00%00%00%00Warning: PHP Request Startup: Session ID is too long or contains illegal
characters — the warning PHP's own regression test asserts.
The emitted length follows attacker input. Sweeping the follow-up request's filler value size:
| Filler value size | Emitted session id |
|---|---|
| 16 B | 16 B |
| 96 B | 96 B |
| 128 B | 32 B — no anomaly at this size |
| 256 B | 256 B |
| 512 B | 512 B |
| 32, 48, 64, 192 B | no id — the request died first |
So the id's length field comes from memory the request recycled, and at these field sizes the bytes are the request's own filler. Superseded 28 Oct 2026: growing the value until a single allocation contains the stale pointer decouples the length from the buffer it is read from — an instrumented build measured a 4660-byte id from an attacker-chosen length, with live heap pointers in the tail. See the Stage 3 card below. Recorded negatives: that PoC's pipelining (this CLI server returns zero responses for any pipelined batch), its 256-byte over-read and its 16-byte code cookie did not reproduce here. Counts vary between runs; the shape of the result is stable, the tally is not.
The emitted length is a zend_string struct field, so whether PHP reads
a truthful length depends on where the stale pointer lands — not on what the payload
contains. PS(id)+0x10 is the length PHP will trust; +0x18 is where it
reads bytes from. Land at the start of a buffer you control and the length is truthful;
land inside it at offset ≥ 0x18 and the length is yours. Neither is visible
from the wire, so this was measured from inside the process with an instrumented build.
| Question | Measurement |
|---|---|
| Does the stale pointer land inside a buffer we control? | Yes — a 1024-byte value contains it (at +0x278 in one run, +0x128 in another: the offset moves, the containment does not), 4096 B at +0x78, 8192 B at +0x78. A 256-byte value does not, which is why the Stage 2 sweep never left its own buffer. stage3.py discovers the shape and the offset at runtime rather than assuming either. |
| Is the emitted length ours to choose? | Yes — claiming 0x1234 produced a 4660-byte session id in every run that completed a rep (2 of 3 reps on fresh pools; 4 of 4 in an earlier run, before the pools were split per rep). |
| Is the tail memory we did not write? | Yes — marker bytes from other allocations appear in the output, plus nine heap-like 0x7… values spaced 0x40 apart, i.e. a HashTable bucket array. |
Closed with one inequality rather than an eyeball: the read began in a 1024-byte buffer at
V, so it ends at V+0x400, and every leaked pointer lies beyond
that address. Masking one to Zend's 2 MiB alignment gives the allocator's chunk base — the input the
next two chain steps need. No code pointer, no forged structure, no control-flow change: this is
chain step 3.
memory_limit while staying far inside post_max_size, during request startup.0x1234, 4/4 runs) and the read continues past our allocation into heap holding live pointers. Shown on Zend's allocator and a single worker; the glibc malloc pairing and multi-worker reliability are not.
A public proof of concept exists for the full chain; it publishes no wire capture, and the parts
of it that did not reproduce here are listed above rather than assumed away. A successful RCE
yields code execution as the web worker account (www-data), not root — privilege
escalation is a separate step.