
Every so often a vulnerability lands that makes you re-read the advisory twice. October 2026 gave us two: CVE-2026-109618 and CVE-2026-109619, both CVSS 9.2, both pre-authentication, both living inside PHP’s session handling rather than in any application.
The headline from the researchers is blunt: 14 years of vulnerable code, PHP 5.4.0 (2012) through 8.5.11, patched in 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12. No plugin required. No misconfiguration. A default PHP install that calls session_start() is enough to reach the first primitive.
I spent a short evening running the public lab from ikow/php2shell-poc to see how much of that is paper and how much is real. Short version: the chain works, and it works with less setup than I expected.
The 60-second version
session.upload_progress lets an unauthenticated client write attacker-controlled bytes into a session file under a session ID of their choosing. From there it is a path problem: OOM the decoder to corrupt engine state, or mismatch the serializer handlers to get an object instantiated, then hand the file to any include().
Why this one is interesting
Most “pre-auth RCE” bugs need a vulnerable component to reach first — a login form, an upload handler, a deserialisation endpoint. These two do not. They abuse machinery that ships in every PHP build:
session.upload_progress— enabled by default since 5.4. It stores the filename you send in a multipart upload into your session file, verbatim, before any application logic runs.session.use_strict_mode = 0— the default in many distributions, which means PHP will happily accept a session ID the client invented.- The
phpvsphp_serializehandlers — thephphandler splits session data on the first|and deserialises the remainder. If one endpoint writes withphp_serializeand another reads withphp, you get to choose what gets instantiated.
Chain the first two together and you have an unauthenticated write of arbitrary content into a file whose name you control. Everything after that is the classic question: what reads that file, and what does it do while reading it?
My test environment
Nothing exotic — one Kali host on the lab VLAN (192.168.192.111), Docker 28.5.2, Compose 2.40.3, and the repo’s own lab/docker-compose.yml:
| Component | Detail |
|---|---|
| Front end | nginx:alpine, publishing eleven ports |
| App servers | php:*-fpm — 5.6.40, 7.4.33, 8.1.31, 8.2.34, 8.3.35, 8.2.35 (patched control) |
| Also | php:8.2.34-apache, php:5.6.40-apache for the mod_php variants |
| Shared | lab/webroot bind-mounted into every container, /tmp/sessions chmod 1777 |
The 8.2.35 container matters as much as the vulnerable ones — a differential pair is the only honest way to claim a CVE reproduced rather than a lab quirk.
One practical snag worth noting for anyone else running this: three images (php:8.0.30-fpm, php:8.4.26-fpm, php:7.4.33-apache) came down as truncated layers — /usr/local/bin/php was a 0-byte file, and every container died with exec format error. Re-pulling needs a working resolver, and my host’s was pointing at a dead nameserver. So my matrix ran on eight targets instead of eleven. Check wc -c /usr/local/bin/php inside an image before blaming the compose file.
What actually happened
The short answer: three chains, three shells.
| Stage | Result |
|---|---|
| Session fixation + content injection | Session file created with my SID, containing <?php system('id');?> as a raw string. No auth. |
| OOM corruption (CVE-2026-109618) | OK: OOM triggered during php_var_unserialize — 30 MB session against memory_limit 32M |
var_destroy UAF (CVE-2026-109619) | R:1500 back-reference resolved out of the freed var_hash — use-after-free confirmed |
| Handler mismatch | Warning: session_start(): Failed to decode session object — the deserialisation path is reachable |
| Chain A — session + LFI | uid=33(www-data) gid=33(www-data) |
| Chain B — UAF → handler overwrite | uid=0(root) (privileged container, image-offset specific) |
Chain C — mismatch → __destruct gadget | /tmp/rce_proof.txt = uid=33(www-data) |
Two honest caveats, because a lab write-up without them is marketing:
- The standalone header/nested/oversized-body OOM harness never reproduced through nginx. The reverse proxy’s buffers absorb the payload long before the Zend allocator notices. The OOM that does work in this setup is the session-decode path, which is also the one the chains depend on.
- The stale-FPM-worker consumer step didn’t trigger with the default pool. Hitting the same worker twice needs
pm.max_children = 1or sustained worker pinning — a real-world constraint, not a lab bug.
Chain B is the flashiest result and the least portable: it walks /proc/self/mem to rewrite a var_dump handler into zif_system, with offsets calibrated for that exact image. Chain A is the one I would actually worry about as a defender, because it needs only one thing on your side — any include sink that takes user input, plus the session file path.
If you run a PHP estate
- Patch to 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12. This is not a “mitigate later” bug.
- If you cannot patch yet:
session.use_strict_mode = 1, and considersession.upload_progress.enabled = Off(it breaks progress bars, nothing else important). - Hunt for session files containing
<?phpor a leading|O:, oversized multipart bodies carryingPHP_SESSION_UPLOAD_PROGRESS, andFailed to decode session objectin your PHP logs. - The repo ships detection content for exactly this: ModSecurity rules, an nginx/OpenResty Lua script, and a YARA rule under
detection/.
Full walkthrough
The complete chain — every stage, the php.ini pre-conditions, the weaponised requests and the verbatim output from my run — is in the diagram I built from the lab:

If you only take one thing from this: the bug was not in an application. It was in the part of PHP everyone forgot was attack surface.




















