
PoC and verification material for CVE-2026-109619 (PHP stale worker-global state)
PoC and verification material for CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp, "RCE via stale global state", CVSS v4.0 9.2 Critical, CWE-416) — the sibling advisory of CVE-2026-109618, fixed by the same PHP core commit on 2026-10-21 (8.2.35 / 8.3.36 / 8.4.27 / 8.5.12).
Overview — PHP keeps worker-global state (
EG(last_fatal_error_backtrace), sessionPS(id)/PS(save_path), the var-layerBG(serialize)/BG(unserialize)contexts, OPcache per-worker map frontier) that can point into request-owned memory. A fatal error (or OOM bailout) that abandons an operation before its matching reset leaves the global dangling after the request heap is freed. A later operation running before normal request initialization consumes the stale value: a cross-request use-after-free the vendor developed into unauthenticated RCE.
require failure, Maximum execution time exceeded; or
nonfatal diagnostics that repopulate error state after shutdown cleared it.php_value/.htaccess, FPM
PHP_VALUE/PHP_ADMIN_VALUE), and the session upload-progress early
machinery (application-agnostic, no session_start() needed).| Tier | Status | Evidence |
|---|---|---|
Producer: application-phase fatal publishes a request-owned backtrace (fatal_error_backtraces=On, compiled default on 8.5) | captured (3/3) on vulnerable php-8.5.11, patched php-8.5.12 and the ASAN twin | evidence/01-fatal-backtrace-producer.txt |
Consumer: pre-RINIT diagnostic fires on an over-limit multipart POST (main/rfc1867.c:697 gate, no body read needed) | captured on mod_php | evidence/02-consume-diagnostic-pre-rinit.txt — Warning: PHP Request Startup: POST Content-Length of 10485760 bytes exceeds the limit of 8388608 bytes in Unknown on line 0 |
| Cross-request UAF sanitizer receipt / RCE | documented, not reproduced here | vendor-confirmed RCE (fatal-backtrace path on mod_php; session-lifecycle path on mod_php AND php-fpm; OPcache type confusion on WordPress — Wiz). Public audits report the exploit tiers need per-build offsets + heap grooming |
Two independent peer-review passes were performed on this material (reject-and-fix iteration, then a zero-blocking confirmation pass).
poc/exploit_opt.py producer + consumer driver (compact)
poc/exploit_readable.py same, tutorial-grade
evidence/ captured lab transcripts (paths scrubbed)
lab/ self-contained docker compose lab (identical to
the companion advisory's lab; either copy runs
standalone)
python3 poc/exploit_opt.py --url http://127.0.0.1:8082/ --rounds 3
python3 poc/exploit_readable.py --url http://127.0.0.1:8082/ --rounds 3
Lab assumptions: the ASAN twin runs php -S 0.0.0.0:8080 -t /www inside the
container, and the PoCs read the server log via
docker logs cve-2026-109618-asan — both are wired for the shipped lab/
compose; if your container/app names differ, adjust LAB_CONTAINER and the
--url port.
Each round: produce (fires the lab fixture fatal that publishes the
backtrace state) then consume (over-limit declared Content-Length — the
diagnostic fires before any body byte is read, so the transport is
fire-and-half-close; waiting on a full response would hang by design).
Output tiers are printed separately: published=True marks the producer
receipt; an AddressSanitizer report after rounds would be the UAF-tier
receipt (not yet captured in any tested configuration — the tool says exactly
that rather than claiming it).
report_memleaks=0 per-dir deprecation fired per-request; earlier
"does not fire" reports were probe artifacts — the diagnostic goes to the
display layer, not the buffered log a naive grep watches).31c0ea7d7f) removes the OOM bailout class entirely
(delayed soft OOM at VM safe points + hard _exit()), resets the
"may be accessed before php_request_startup()" globals early, and locks
the pre-RINIT session decode to __PHP_Incomplete_Class.fatal_error_backtraces=0 (removes the confirmed producer)
and/or session.upload_progress.enabled=0, then restart every worker.pm.max_requests=1 limits each worker to a single request as a stopgap.log_errors=On + error_reporting=E_ALL for repeated
pre-script diagnostics, fatals and max-execution-time events on
attacker-influenceable routes (absence of log entries is not proof of
safety).A self-contained docker compose lab ships in lab/ (identical to the
companion advisory's lab; either copy runs standalone): cd lab && docker compose build && docker compose up -d — ports 8080=vuln(8.5.11), 8081=fixed
(8.5.12), 8082=asan. The producer fixture (lab/www/fatal.php) ships in the
image on all three twins.
Unknown on line 0 (startup stage)
on attacker-influenced routes.For authorized security research and defense on systems you own or are
explicitly permitted to test, in isolated lab environments. Test the
vulnerable behavior from a source build of the last vulnerable tag
(php-8.5.11). No warranty, see LICENSE.
Prepared with the b63 exploit-foundry tooling: advisory verification against primary sources, a reproducible pinned-build lab, two PoC variants, captured transcripts, and two adversarial review passes. Feedback and corrections welcome via issues.