Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-109619 — Reproduction, root-cause analysis and documented UAF-to-RCE chain for CVE-2026-109619, a cross-request use-after-free in PHP's session.upload_progress, with ASAN traces and a reproducer. | Kitploit
Tools/GitHubGitHub/santihabib/cve-2026-109619
Defensive ToolsMemory ForensicsVulnerability AnalysisExploitationDebuggersWeb SecurityPapers & ResearchLearning & EducationBinary Exploitation
GitHubsantihabib/cve-2026-109619

CVE-2026-109619

Reproduction, root-cause analysis and documented UAF-to-RCE chain for CVE-2026-109619, a cross-request use-after-free in PHP's session.upload_progress, with ASAN traces and a reproducer.

11 month agoNot yet reviewed
Share
View Repository

CVE-2026-109619 · UAF → full chain to RCE

Cross-request use-after-free in PHP's session.upload_progress

Independent reproduction, root-cause analysis and full exploitation chain on PHP 8.5.11

by Santiago Habib

CVE GHSA Affected Fixed License

Full technical analysis →


TL;DR

php_request_startup() parses the multipart body, and with it runs the session.upload_progress callback, before PHP_RINIT(basic) resets BG(serialize) and BG(unserialize).

If a session decode runs out of memory, zend_bailout() skips PHP_VAR_UNSERIALIZE_DESTROY. The global is left at level = 1, pointing into a request heap that is about to be freed. The next request on the same worker reaches the callback before RINIT and reuses the freed pointer.

Bug classUse-after-free (cross-request, stale global state)
Componentmain/main.c startup order · ext/session · ext/standard/var_unserializer
ReachabilityAny endpoint that accepts multipart/form-data. No auth, no session_start() needed
Deterministic resultPre-auth worker crash (SIGSEGV)
RCEDemonstrated on single-worker mod_php (php:8.5.11-apache) as www-data. High-complexity and build-specific; the weaponized exploit is not published here
Fixphp_basic_early_rinit() in PHP 8.5.12 (21 Oct 2026)

How it works

sequenceDiagram
    autonumber
    participant A as Client
    participant W as PHP worker
    participant G as BG(unserialize)

    Note over A,G: Request 1 · large session (a:1048576:{...})
    A->>W: multipart POST + PHP_SESSION_UPLOAD_PROGRESS
    W->>G: php_var_unserialize_init() → level=1, data=ptr
    W->>W: array_init_size(1M) exceeds memory_limit
    W--xW: zend_bailout() skips PHP_VAR_UNSERIALIZE_DESTROY
    Note over W,G: request heap freed, but level=1 and data=ptr (dangling)
    W-->>A: 500 Internal Server Error

    Note over A,G: Request 2 · small session (x|i:1;)
    A->>W: multipart POST + PHP_SESSION_UPLOAD_PROGRESS
    Note over W: php_hash_environment() runs BEFORE RINIT
    W->>G: level > 0 → reuse stale data
    W--xW: tmp_var() reads (*var_hashx)->last_dtor → SIGSEGV

The ASAN stack shows the whole path running inside php_request_startup(), before a single line of application code:

==PID==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000013a
    #0  tmp_var                        ext/standard/var_unserializer.c:173
    #1  var_tmp_var                    ext/standard/var_unserializer.c:195
    #2  ps_srlzr_decode_php            ext/session/session.c:1149
    #3  php_session_decode             ext/session/session.c:320
    #4  php_session_initialize         ext/session/session.c:540
    #5  php_session_rfc1867_cleanup    ext/session/session.c:3199
    #6  php_session_rfc1867_callback   ext/session/session.c:3364
    #7  rfc1867_post_handler           main/rfc1867.c:1273
        ...
    #13 php_hash_environment           main/php_variables.c:794
    #14 php_request_startup            main/main.c:1945

Full report: poc/asan-trace.txt.

Reproduce

Requirements: Linux, a C compiler, make, curl, xz and Python 3.8+.

git clone https://github.com/santihabib/CVE-2026-109619.git
cd CVE-2026-109619

./build.sh              # PHP 8.5.11, normal build
./build.sh asan         # optional: PHP 8.5.11 with AddressSanitizer

python3 poc/repro_uaf.py
python3 poc/repro_uaf.py --php build-asan/php-8.5.11/sapi/cli/php --verbose

build.sh downloads the official tarball, checks its SHA-256 and builds with --disable-all --enable-session --enable-cli. Everything stays inside the repo directory and nothing is installed.

Expected output

[*] php          build/php-8.5.11/sapi/cli/php
[*] server       http://127.0.0.1:54249/  memory_limit=16M
[*] req1         seeded session: 4194317 bytes (1048576 elements)
[*] req1         HTTP/1.0 500 Internal Server Error  oom=True  alive=True
[*] req2         seeded session: x|i:1;
[*] req2         <no response>  exit=-11  asan=False
[+] worker crashed: BG(unserialize) reused the freed php_unserialize_data

The script exits 0 only when the worker dies from a signal. On a patched build the second request returns 200, the worker survives and the script exits 1:

./build.sh patched
python3 poc/repro_uaf.py --php build-patched/php-8.5.12/sapi/cli/php

[!NOTE] The large session is written to session.save_path by the script to simulate an existing session of that size. This is a lab shortcut that isolates the startup-order bug. The server runs on 127.0.0.1 with a throwaway temporary directory, which is removed at the end.

From crash to code execution

The pre-auth crash is the entry point, not the end. The same stale pointer can be driven to command execution on a single-worker mod_php target: the official php:8.5.11-apache image with Apache prefork. At a conceptual level the chain is four steps.

  1. Dangle. The trigger request exhausts memory_limit inside the multipart parser while the upload-progress callback is initializing the session. The OOM bailout skips the normal shutdown, so a session-side pointer to a zend_reference is left dangling: the structure is freed with the request heap while the worker keeps the address.
  2. Reclaim. The next request sprays many session values, each large enough to cover a 4 KiB page. Inside each value it lays out a fake zend_reference at the offset where the stale pointer lands, and a fake HashTable elsewhere in the same page. The fake reference points its value at the fake table and keeps a valid type tag.
  3. Aim the destructor. The fake HashTable carries pDestructor = zif_system (PHP's internal system() handler) plus a fake execute_data frame in the same page, so that when the destructor fires it reads its argument, the command, from a controlled zend_string.
  4. Fire. When the session is torn down, the engine resolves the stale reference to the fake table and invokes its destructor. system() runs the command as www-data.

Two things keep this high-complexity rather than turnkey:

  • Finding where the pointer lands. The reference offset inside the 2 MiB Zend MM chunk depends on the build and on the request layout. Recovering it needs a search: the low bits are the offset inside the page, the high bits select the page. A timing oracle, a sleep placed before the command, makes a successful reclaim observable as a slower response, so the search converges.
  • Resolving addresses. zif_system and the destructor path live at build-specific addresses. On a fixed image they are constant; against an unknown target they need a leak or a per-image recovery step. There is no universal "one POST and shell".
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    891
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    810
  • 3

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    638
  • 4

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    453
  • 5

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    436
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    386

Explore all tools

Browse our collection of tools

View all tools →