
PoC and verification material for CVE-2026-115560 (PHP session serializer confusion via session.upload_progress -> object injection -> RCE)
session.upload_progress → unauthenticated object injection → RCEPoC and verification material for CVE-2026-115560: PHP writes attacker-influenced
upload-progress data into the session file under the configured serializer;
an application that switches session.serialize_handler to php at runtime
before session_start() then decodes those bytes with the php parser, whose
record separator is the | character — handing the deserializer to attacker
bytes. This repository demonstrates the resulting chain to unauthenticated
remote command execution against a locally recreated lab built on PHP 8.5.12.
Status note (read first). The PHP project published an informational advisory for this CVE on 2026-10-23 and states the full advisory will ship with the next regular bugfix release. No CVSS score, CWE, affected-version range or GHSA has been published for this CVE at the time of this repository's release, and this repository asserts none. A CVSS 9.2 figure circulating in coverage of the October 21 PHP releases belongs to CVE-2026-109619 (a different bug); this material deliberately does not quote it. If the full vendor advisory changes the technical picture, this repository will be corrected in place.
PHP's advisory names the vulnerable combination:
An application must set
session.serialize_handlertophp_binaryorphp_serializein its configuration and then switch it tophpat runtime withini_set()before callingsession_start(). Session upload progress must also still be enabled.
Mechanism (observed against PHP 8.5.12 and consistent with the advisory text;
courtesy of reading ext/session/session.c and main/rfc1867.c in the pinned
8.5.12 tree):
PHP_SESSION_UPLOAD_PROGRESS field makes the
upload hook write an upload-progress record into the session file before
the session module initializes the request — under the configured
serializer (php_binary or php_serialize).ini_set('session.serialize_handler','php')
and session_start(), PHP decodes the file with the php decoder, which
splits records on the first |. The attacker's | moves the parse start
into attacker-chosen bytes.php_var_unserialize() runs on those bytes with class autoloading and
destructors enabled → arbitrary object injection.__destruct() persists a property to a path
(this repository's lab ships a framework-style cache-writer class as the
gadget surface) drops a webshell → command execution as the web user.Two negative controls each individually break the chain — one of them is PHP's
recommended mitigation (session.upload_progress.enabled=0), the other is the
guard the advisory's preconditions imply the application owns (never switching
the handler at runtime) — and both are verified as causal negative controls in
this repository.
session.upload_progress.enabled=0
until the next regular bugfix release. The same setting was already listed on
21 Oct 2026 as a mitigation for CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp).Everything in the captured tier has the transcript that proves it, in
evidence/, produced verbatim by tooling that records command, working
directory, UTC timestamp and exit code. Everything in the second tier is
documented, not reproduced here, with the reason.
| # | Claim | Tier | Evidence |
|---|---|---|---|
| 1 | Lab fingerprint: PHP 8.5.12, serialize_handler=php_binary, upload progress on, mpm_prefork + mod_php | captured | evidence/01-lab-fingerprint.txt |
| 2 | The upload hook writes the php_binary record containing the attacker's | (byte dump); the handler-switching app then fails to decode the same session file | captured | evidence/02-poison-bytes-decode-mismatch.txt |
| 3 | RCE, non-default cleanup=0 profile: poisoned record → confused decode → gadget __destruct writes a PHP shell → nonce-verified id//etc/passwd as uid=33(www-data) | captured | evidence/03-direct-rce-cleanup0.txt |
| 4 | RCE on the DEFAULT cleanup=1 profile: direct path fails (record erased at upload completion), concurrent request racing the streaming window lands the decode | captured | evidence/04-race-rce-default-cleanup.txt |
| 5 | RCE with session.serialize_handler=php_serialize (the other serializer PHP names in the advisory) | captured | evidence/07-rce-php-serialize-profile.txt |
| 6 | Causality receipt for the no-switch negative: the identical poisoned request is rejected by the vulnerable app but accepted (progress key listed) by the consistent-handler app | captured | evidence/05-consistent-twin-decode-receipt.txt |
| 7 | Both configuration negatives (upload progress off; no runtime switch), direct and race modes: exit 1, no nonce, no shell written — 4/4 exploit invocations across isolated docroots, each seed also byte-verified clean | captured | evidence/06-negatives-isolated-docroots.txt |
| 8 | Reliability: 5/5 direct (cleanup=0) + 10/10 race (default profile) on the shipped implementation | captured | evidence/08-reliability-15-of-15.txt |
| 9 | php_binary key-length ceiling measured with corrected numbers (55-byte key → 381-byte record; 172-byte key → 0-byte file, encoder skips over-long keys) | captured | evidence/09-key-length-ceiling.txt |
| 10 | Exit-code contract of both drivers (0 executed+nonce / 1 completed-no-execution / 2 usage / 3 transport), incl. malformed port → 2 | captured | evidence/10-exit-code-matrix.txt |
| A | Vulnerable PHP versions beyond 8.5.12 (e.g. the "> = 5.4" range implied by the code history) | documented, not reproduced here | only 8.5.12 was executed; the statement is source-derived from the pinned tree, labelled as such |
| B | A stock Composer-library gadget chain (e.g. monolog) | documented, not reproduced here | the shipped lab uses a lab-provided model class App\Cache\FileCache (framework-style cache writer); "RCE given any class with a file-writing destructor" is what the transcripts show — "RCE against framework X out of the box" is not claimed |
| C | Race timing on a real (non-loopback) network | documented, not reproduced here | 10/10 was measured in-container on loopback with a 1.5 s settle; a real network adds jitter and no timing sweep was done |
| D | A patched-build negative | documented, not reproduced here | impossible: no fixed PHP release exists yet |