Repository navigation
Educational proof of concept for CVE-2026-126714 (phpAfterShell) — unauthenticated RCE through PHP's file-based session handler (CVSS 9.2; fixed in 8.2.36 / 8.3.37 / 8.4.28 / 8.5.13).
What's in this release
./phpaftershell-poc— the exploit: 100% remote, plain HTTP only. No oracle, no diagnostic endpoints, no target-side cooperation: it steers entirely from natural signals (victim-connection timing with a self-calibrating split, PHP's decode warning as a hold-guard, a per-run random webshell as the only positive hit) and searches the pressure band with a sliding bracket + sampling.- Automated lab (
docker compose up -d --wait): vulnerable 8.4.27 (8087), patched 8.4.28 control (8088), mitigated target (8089) — all localhost-only, healthchecked. - Three verification stages: deterministic splice grammar, the real memcg-OOM-interrupted
pwrite(), and the full remote chain. - CI on every push: unit tests (9), stage 1, stage 2, fresh target, charge trace, remote RCE, and two negative controls (patched must not be exploitable; mitigated must never write a progress record).
- Defensive material:
SECURITY.md+ a Detection & IOCs section in the README.
Validated
Green CI on the GitHub runner with this code: unit 9/9, stages 1 & 2 pass, remote RCE (attempt 14), both controls pass.
Requirements
Vulnerable PHP with default file sessions + a memory-bounded target (cgroup) + a destructor gadget. Attacker side: any OS with Python 3. See README for the exact scope.
Authorized testing only — see the README disclaimer. Exploit-chain credit to depthfirst.