phpAfterShell (CVE-2026-126714): PHP 8.2–8.5 Session RCE Fix
Disclosed Nov 19 by depthfirst, phpAfterShell (CVE-2026-126714, CVSS 9.2) splices PHP file session writes into deserialization RCE on PHP 8.2–8.5.
Author: Logic42 Engineering
Consider a hotel front-desk clerk who erases only the first half of a clipboard guest form instead of taking a clean sheet of paper, leaving yesterday's room numbers spliced onto today's check-in name. That incomplete overwrite is why "phpAfterShell" (Common Vulnerabilities and Exposures CVE-2026-126714, Common Vulnerability Scoring System (CVSS) 9.2) lets unauthenticated attackers turn routine PHP file sessions into Remote Code Execution (RCE).
Disclosed by security researchers at depthfirst on November 19, 2026, CVE-2026-126714 exploits an operational blind spot. Enterprise teams that patched October's PHP2Shell bug (CVE-2026-109618) remain exposed if their PHP runtime (8.2, 8.3, 8.4, or 8.5) still uses the default disk-based files session save handler.

Instead of attacking object creation syntax directly, phpAfterShell corrupts the persistent session file on disk before your PHP script ever checks a password or role.
What Is phpAfterShell (CVE-2026-126714) and Why Do PHP2Shell Patches Miss It?
phpAfterShell (CVE-2026-126714, CVSS 9.2) is a critical deserialization RCE vulnerability in PHP's default file-based session handler affecting versions before 8.2.36, 8.3.37, 8.4.28, and 8.5.13. Because it exploits a non-atomic overwrite bug inside session disk storage rather than runtime object restrictions, systems that only applied October 2026 PHP2Shell (CVE-2026-109618) mitigations stay vulnerable.
Before inspecting logs, platform engineers need a crisp separation between October's runtime exploit and November's persistence-layer bypass:
| Dimension | PHP2Shell (CVE-2026-109618 · Oct 2026) | phpAfterShell (CVE-2026-126714 · Nov 19, 2026) |
|---|---|---|
| Attack Layer | PHP runtime execution and request parsing layer. | Session disk persistence layer (session.save_handler = files). |
| Core Mechanism | Runtime object creation bypass inside Hypertext Transfer Protocol (HTTP) handlers. | Non-atomic in-place file overwrite without prior truncation; an interrupted write splices new prefix bytes onto stale tail bytes. |
| Pre-Authentication Trigger | Application-layer HTTP request parsing. | Unauthenticated multipart upload-progress writes before application code runs. |
| October Patch Status | Mitigated once October 2026 updates are deployed. | Still Vulnerable until November 19 patches (8.2.36 / 8.3.37 / 8.4.28 / 8.5.13) are applied. |
How Does Non-Atomic File Session Splicing Trigger Deserialization RCE?
Non-atomic file session splicing enables PHP Object Injection (POI) because the default files save handler overwrites existing session files in place without truncating or clearing stale bytes first. When an attacker triggers an unauthenticated session write via PHP upload progress and interrupts a PHP worker mid-write, leftover session tail bytes splice with attacker input, corrupting deserialization boundaries inside session_start().
That three-stage file corruption chain happens reliably on disk-backed session volumes:
-
Stage 1: Pre-Application Upload-Progress Write: PHP enables
session.upload_progress.enabledby default on many web stacks. By submitting an unauthenticated multipartHTTPupload with a matching upload-progress field, a remote caller forces PHP's C core to write attacker-controlled key/value strings into/tmp/sess_<id>before application authentication middleware executes. -
Stage 2: Worker Interruption Creates a Corrupted File Splice: Because the
fileshandler writes sequentially over existing disk blocks without prior truncation or atomic temp-file replacement, exhausting worker memory or triggering an early request abort leaves a spliced session file on disk: newly injected prefix bytes concatenated directly to leftover tail bytes from a previous session payload. -
Stage 3:
session_start()Parses Raw Strings as Objects (POItoRCE): When a subsequent request callssession_start(), PHP's session unserializer loses type alignment across the corrupted boundary. Raw string content is interpreted as a serialized PHP Object (O:...), firing native or framework gadget chains (reusable object sequences that execute commands during deserialization) under the FastCGI Process Manager (PHP-FPM) worker identity.
Which PHP Versions and Session Configurations Are Exposed?
All PHP branches running the default files save handler prior to the November 19, 2026 security releases (8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0) are exposed to CVE-2026-126714. Deployments that route sessions exclusively through external atomic key-value engines such as Redis or Memcached aren't affected by this disk-splice defect, though unpatched binaries still warrant immediate remediation.
| PHP Release Branch | Vulnerable Versions | Mandatory Patched Version (Nov 19, 2026) | Container & Worker Action |
|---|---|---|---|
PHP 8.2 Long-Term Support (LTS) | < 8.2.36 | 8.2.36 | Upgrade runtime packages & restart all PHP-FPM masters. |
| PHP 8.3 | < 8.3.37 | 8.3.37 | Rebuild base container images & cycle worker pools. |
| PHP 8.4 | < 8.4.28 | 8.4.28 | Verify php -v across Command-Line Interface (CLI), cron, and PHP-FPM pods. |
| PHP 8.5 | < 8.5.13 | 8.5.13 | Apply vendor repository patch & purge stale /tmp/sess_*. |
| PHP 8.6 | Pre-release builds | 8.6.0 | Patched in the general availability release. |
How Do Infrastructure Teams Eliminate phpAfterShell Permanently?
Infrastructure teams can eliminate phpAfterShell permanently by upgrading to the November 19 PHP releases, restarting every PHP-FPM worker pool, disabling session.upload_progress.enabled in php.ini, and migrating session.save_handler from local disk files to atomic redis or memcached stores while keeping perimeter Web Application Firewall (WAF) rules as defense-in-depth.
; /etc/php/8.4/fpm/conf.d/99-sovereign-session-hardening.ini
; 1. Eliminate non-atomic disk file splicing via atomic Redis key-value writes
session.save_handler = redis
session.save_path = "tcp://10.0.12.40:6379?auth=REDACTED_EPHEMERAL_SECRET"
session.serialize_handler = php_serialize
; 2. Block unauthenticated pre-application upload-progress session writes
session.upload_progress.enabled = 0
session.use_strict_mode = 1
Execute four remediation steps to close every exposure path:
-
Upgrade PHP Binaries and Cycle
PHP-FPMWorkers: Runningaptoryumupdates on disk won't protect active requests while long-livedPHP-FPMprocesses keep the old binary in memory. Verify bothphp -vand active worker start timestamps immediately after rollout. -
Switch
session.save_handlerto Atomic Key-Value Storage (Redis): File-based sessions on local disks or shared Network File System (NFS) mounts don't give you atomicSETsemantics or horizontal container safety. Migrating to Redis withphp_serializeprevents leftover-byte splicing structurally. -
Disable Unauthenticated
session.upload_progress& Enforce Strict Mode: Setsession.upload_progress.enabled = 0unless your frontend explicitly consumes native server upload bars, and keepsession.use_strict_mode = 1so PHP rejects uninitialized caller-supplied session identifiers. -
Layer WAF Rules Only as Temporary Perimeter Triage: While vendors such as Cloudflare pushed edge rules targeting known
CVE-2026-126714upload-progress probes, security advisories warn that edgeWAFfilters don't replace patching the underlying PHP runtime. Audit container patch hygiene against International Organization for Standardization / International Electrotechnical Commission (ISO/IEC) 27001 controls via the ISO/IEC 27001 Infrastructure Continuity Diagnostic.
Never reuse a half-erased clipboard sheet when a clean form costs nothing. Replacing partial disk overwrites with patched November 19 PHP binaries and atomic Redis session keys ensures session_start() never inherits corrupted tail bytes from a failed request.
Enjoyed this autopsy? Get next Monday's architecture teardown + SVG blueprints in your inbox.
1 email every Monday morning. Zero marketing fluff — just real VRAM math, MCP security traps, and sovereign lakehouse patterns.
Further Reading
NGINX2Root (CVE-2026-123007) & vCenter (CVE-2026-123890): Patch Guide
F5 patched NGINX2Root HTTP/2 RCE flaws (CVE-2026-123007, CVE-2026-123633) as Broadcom patched active vCenter zero-day CVE-2026-123890 (exploited via BONESAW).
Java4Shell (CVE-2026-114938), Chase/Zelle & FBI ARTEX: 72h Dossier
Forensic analysis of the Nov 16–19 incidents: OpenJDK AVX-512 Java4Shell RCE, JPMorgan Zelle delays, and FBI ARTEX vs. NVIDIA OpenShell.
Bleeding Llama (CVE-2026-7482): GGUF Memory Leak Defense
How the critical Bleeding Llama (CVE-2026-7482) heap over-read in Ollama's GGUF loader leaks live LLM prompts and API keys, and how to harden enclaves.
Inside the US FAA Ground Stop: How a TDM Router Flood Halted Flights
How an L3Harris TDM-to-fiber cutover router flooded the FAA FTI network with 1,000 connection requests every 5 seconds and grounded US aviation.
See HiveOS Enterprise & Bea (Business Execution Assistant) in Action
HiveOS connects to 5,000+ workplace apps with client-side PII redaction, 3-model consensus verification, and 80%+ local SLM cost savings. Watch the 30-second Executive Overview and 3-minute Walkthrough on gethiveos.com, or download the 6-slide Product Brochure.
Auditing Runtime & Agentic Containment?
If your engineering teams are deploying autonomous tool loops, MCP servers, or evaluation sandboxes, our cyber practice conducts confidential architectural reviews to expose link-local leakage, SSRF vectors, and credential harvesting paths.
Debugging this pattern in your own stack? Ask a Principal Architect directly or request a free 48-hour architecture sanity check: