
PHP CVE-2026-109619 stale session state: calibrated mod_php lab reproduction, evidence, and solver
This repository records a lab reproduction of the session upload-progress path covered by PHP's CVE-2026-109619 advisory. The related out-of-memory handling issue is CVE-2026-109618. This is not a new CVE assignment or a claim of discovering the underlying vulnerability. It does not establish a general cross-version exploit, a post-patch bypass, or FPM command execution.
On Linux amd64 with rootless Podman and a Compose provider, the verified
two-version comparison starts with bash labs/compose/run.sh --engine podman.
The Compose guide lists prerequisites and cleanup.
In one isolated Apache mod_php lab profile, a multipart request exhausted PHP's 8 MiB memory limit after upload-progress session state was published. A second request to the same worker reclaimed a stale PS(http_session_vars) reference. The recorded run reached PHP's system handler with cat /flag.txt and returned HTB{zend_pipeline_lab_proof}. That flag was created for this lab; it is not an official challenge flag.
The proof used PHP 8.4.16, Apache 2.4.66, one prefork worker, session.upload_progress.enabled=1, session.use_strict_mode=1, and output_buffering=0. The historical solver contains addresses measured for one Apache parent. A later HTTP-only strict-session cookie leak returned 4,020 decoded bytes and revealed the current Zend heap chunk. The first HTTP-only id path tried bounded, 2 MiB-aligned libphp candidates and succeeded on two fresh parent mappings. A newly calibrated cookie layout also discloses a real libphp destructor pointer directly. The updated solver derived both bases from HTTP responses and returned verified id output on the initial exact-module container parent and two fresh restarts, each with changed mappings. These results apply to the pinned build and settings, not arbitrary deployments.
The containerized 8.4.16 lab installs that same
archived PHP module and Apache package revision. It first reproduced the heap
cookie and a lab-assisted id run. The historical invalid-prefix worker reset
returned a normal response in this container, and its module mapping fell
outside the aligned candidate search. The original solver's different HTTP
rotation sequence did replace the worker. Combined with the direct module
disclosure, it completed the HTTP-only id path after two container restarts.
The four-child Apache control tracked the child serving each request. In 16 fresh-restart trials with no intervening request, the producer and consumer reached different children and returned an ordinary 32-byte cookie. In 16 fresh-restart trials with three benign scheduling requests that avoided the producer child, the pair reached the same child and returned a controlled 39-byte marker. A separate scheduling study compares benign concurrent, keep-alive, and pipelined GET pairs, and labels its 10/50/100-worker figures as a probability model. Neither experiment measures general multi-worker command reliability.
The exact 8.4.16 FPM control found a different boundary for the original multipart-startup producer: its memory-limit failure ended the FPM child, and a replacement handled the safe follow-up. In two new runs, an application-stage decoder failure left the child alive and, in a read-only local memory check before the next PHP request, left BG(unserialize) data non-NULL at level 1. Sampled session ID and module-data fields remained null. Either an ordinary request or an immediate safe upload cleared the decoder state; the latter returned HTTP 200 with no cookie. This establishes a post-startup producer observation, with no verified FPM early consumer, use-after-free, or command execution. See FPM_NOTES.md for the request-boundary analysis.
The separate pinned 8.4.27 FPM control also
reached a post-startup decoder memory fatal and observed the same worker serve
an immediate small upload with no Set-Cookie header. It did not inspect
decoder globals between requests, so it does not establish reset timing or a
general patched FPM negative.
A separate read-only patched FPM diagnostic
could not inspect the ordinary pool and stopped before its producer. In a
checked pool changed only to permit process inspection, it found the decoder
pointer clear and level 0 immediately after the fatal and after the safe
upload on the same child. These checkpoints do not identify the cleanup path
or prove exact early-consumer timing. A dynamic 8.4.16 FPM control
also measured pm.max_requests=1 retiring the decoder-fatal child before a
safe upload reached a replacement child.