
Minimal PHP session upload progress use-after-free PoC and Docker lab.
Local proof of concept for CVE-2026-109619, a use-after-free in PHP session upload progress. Tested with PHP 8.5.11, Apache, and x86-64.
Fixed versions: PHP 8.2.35, 8.3.36, 8.4.27, and 8.5.12.
Trigger: A multipart upload starts session progress and hits the PHP memory limit before the request resets session state. A later request on the same worker reuses the freed state.
Leak: Reclaiming the stale session ID with a forged length makes Set-Cookie expose heap and libphp addresses. The execution stage uses the same stale reference to run id>/tmp/p inside the container. The included lab pins the PHP image and uses one Apache worker.
Scope: The exploit accepts loopback HTTP URLs only, and Compose binds 127.0.0.1:18132; the container still uses Docker bridge networking. Hard-coded offsets target the pinned x86-64 build. Use only in an authorized lab.
Verification: Exit status alone does not prove command execution. Check /tmp/p as shown below. The sample www-data result was reproduced in this lab; patched builds were not tested here.
docker compose up -d --build
python3 exploit.py
docker compose exec -T web cat /tmp/p
Example result:
leak: libphp=0x7ffffaa00000, heap=0x7ffffe000000
fire: HTTP/1.1 200 OK;
sent `id>/tmp/p`; verify inside the lab with: docker compose exec -T web cat /tmp/p
uid=33(www-data) gid=33(www-data) groups=33(www-data)