Skip to main content
Mallory
CriticalPublic exploitVulnerability

CVE-2026-126714: phpAfterShell

Published Nov 19, 2026 · Updated today
Trending this week#4of 432,696 vulnerabilities
Mention activity · 30 daysAt least 200 mentions · peak 100 in a dayToday
CVSS9.2Critical · v4
EPSS13.3%96th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
PHP Group
IdentifiersCVE-2026-126714CWE-367 · Time-of-check Time-of-use (TOCTOU)…

phpAfterShell is a critical vulnerability in PHP's default file-based session save handler. Existing session files are overwritten in place without first clearing their contents, with truncation performed separately. Interrupting this operation can leave a prefix of newly serialized session data followed by a suffix of the previous session. An attacker who influences session contents can arrange for bytes previously contained within ordinary strings to be interpreted as serialized objects when the corrupted session is subsequently loaded. Object injection can lead to remote code execution when a suitable deserialization gadget chain is available; session corruption can occur independently. Affected supported branches are PHP 8.2 before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28, and 8.5 before 8.5.13. Older unsupported branches are also affected unless covered by vendor-backported fixes.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can compromise confidentiality, integrity, and availability through arbitrary code execution with PHP worker privileges. Consequences depend on service-account permissions and can include access to application data, modification or deletion of files, and disruption of services. Even without a usable code-execution chain, interrupted writes can corrupt application session state and affect application integrity and availability. Authentication requirements depend on the exposed application or product: upload-progress processing can provide an unauthenticated entry point, whereas affected F5 BIG-IP management functionality requires authentication.

Mitigation

If you can’t patch tonight, do this now.

Administratively disable session.upload_progress.enabled when upload tracking is unnecessary, and minimize attacker-controlled data stored in sessions. Disabling upload progress removes one input route but does not protect applications that independently store untrusted session values. Switching to a session backend that replaces records atomically avoids this specific file-write defect. Session-file locking alone does not make writes atomic. Run PHP workers with least privilege and restrict access to exposed management interfaces. These controls do not replace patching deployments that retain the vulnerable files handler.

Remediation

Patch, then assume compromise.

Upgrade to PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, or a later fixed release in the applicable branch; PHP 8.6.0 also includes the fix. Alternatively, install a distribution-supported package containing the backported correction. The fix truncates the session file to zero before writing replacement data and aborts the write if truncation fails, preventing retention of an exploitable old-data suffix. Restart PHP-FPM or the relevant web-server processes after updating, and verify the runtime actually serving web traffic rather than relying solely on the command-line version. Migrate unsupported upstream branches to supported releases unless a maintained vendor backport is available. For appliances embedding PHP, apply vendor-supported firmware or hotfixes rather than independently replacing PHP.

Public exploits

Exploits

3 exploits validated by Mallory's analysis. Hidden: 5 rejected by Mallory's analysis as not a working exploit.

View more in app →
phpaftershell-labThis is a standalone exploit-training lab, not a framework module. The 22 supplied files include six executable source files: a Python exploit, a Bash reset script, and four PHP application/library files. Supporting material comprises Docker build/Compose definitions, vulnerable and control PHP configurations, Apache configuration, multilingual documentation, a walkthrough, and a deliberately published flag fixture. The intended chain uses stalled multipart uploads to place large attacker-controlled field names into PHP upload-progress session records. A smaller replacement session write is then arranged to preserve an older serialized tail, promoting an embedded ReportJob object into session-deserializer input. ReportJob::__wakeup() reaches the visibly unsafe system() call in LogRotator::rotate(), allowing shell-command execution. The demonstration copies /flag into the served reports directory and downloads the result. PHPSESSID, PHP_SESSION_UPLOAD_PROGRESS, and the upload_progress_ record prefix are relevant protocol/session markers. The reference Python program uses raw HTTP sockets, configurable target/container settings, retry logic, a configurable proof filename, and an expected-miss comparison mode. Crucially, its deterministic mechanism also uses docker exec and an in-container ptrace helper; it is not a purely remote HTTP exploit. Documentation describes a separate unprivileged HTTP cleanup-path variant, but that implementation is not supplied in full. The control disables upload progress, removing the carrier used by this chain. Static evidence supports the application gadget and intended exploit design, but does not independently establish the claimed PHP vulnerability or fix. The CVE identifier and claims about PHP 8.4.28 defaults are repository assertions. The walkthrough contains inconsistent syscall-order explanations, exploit.py is truncated, and the Dockerfile references a missing zap binary; the supplied tree therefore cannot be assumed buildable or operational as-is. Reported smoke-test successes were not independently verified. No external exfiltration or command-and-control service is shown. Repository URL, git reference, and archive size were not supplied; empty strings and zero represent unavailable metadata.tani2shell · Disclosed Nov 20, 2026 · python · php · web · local · containerOperationalcve-2026-126714-phpAfterShellThe supplied repository contains four Markdown documents and six executable/support scripts: two Bash scripts, three Python files, and one PHP file. It presents a laboratory exploit for the claimed CVE-2026-126714, involving non-atomic PHP file-session overwrites. A long carrier string contains a dormant serialized object positioned so that a shorter replacement string's declared ending aligns with it. Interrupting the overwrite can preserve the old suffix and expose an evil session record, potentially causing object injection and gadget-based command execution on a later request. poc/http_attack.py implements carrier POST, multipart replacement POST, and consumer GET requests, with retries and response-based success checks. poc/build_body.py constructs equivalent bodies for poc/attack.sh. The shell driver and poc/agent.sh use Docker access to kill Apache workers when a session-file prefix changes. poc/tp_chain_builder.php builds and self-tests an optional ThinkPHP gadget graph. poc/verify_unit.py constructs synthetic splices. README.md and docs/ describe the proposed mechanism, laboratory results, mitigations, and limitations. Important qualifications: the supplied exploit is a prepared-lab implementation, not a demonstrated standalone unauthenticated remote exploit. Reliable interruption requires privileged server-side assistance; an unassisted HTTP/OOM attack is described but not implemented. The client also writes a local SID file, so operation from a separate machine needs coordination beyond HTTP. Target application files, the FileLogger gadget, ThinkPHP dependencies, and custom bridge classes are missing. The ThinkPHP chain therefore does not establish generic exploitation of stock ThinkPHP 5.0.24. The supplied unit test does not validate its claimed object-injection result: it calls unserialize() only on the first session value, which should decode the note string, rather than decoding subsequent session records. Documentation and claimed evidence should not be treated as independently verified execution results. The CVE assignment, affected-version scope, and claimed fixed versions likewise cannot be confirmed from these files alone. No external callback or exfiltration infrastructure appears in the code. Repository URL, git reference, and archive size were not provided; empty metadata and size 0 represent unavailable values. Listed file sizes total 32,785 bytes.evenomn · Disclosed Nov 20, 2026 · bash · python · web · localOperationalPHPAfterShell-pocThe supplied repository contains a standalone exploit implementation and a deliberately instrumented PHP/Apache laboratory. Its claimed vulnerability is CVE-2026-126714: interruption of an in-place session-file rewrite leaves a new-state prefix followed by an old-state suffix. Carefully arranged serialization lengths then promote bytes previously stored inside a string into a top-level FileCache object. The bundled destructor writes a PHP command webshell. The CVE assignment, affected versions, advisory, and claimed fixes are repository assertions and were not independently verified. Of 16 listed files, eight contain Python or PHP source; Bash also appears in CI and container startup commands. The Python launcher delegates to poc/remote.py, which uses plain TCP sockets for HTTP, held multipart uploads, seven memory-pressure filler connections, and an oracle-driven retry controller. It is not a generic HTTPS client. poc/lab.py supplies serialization geometry, payload construction, HTTP helpers, and Docker/cgroup support. Stage 1 directly writes the mixed session state and therefore demonstrates parser behavior rather than remote interruption. Stage 2 attempts real OOM interruption using privileged local control and page-cache eviction. tests/test_geometry.py contains offline serialization, splice-window, request-size, and classifier tests. app/index.php deliberately supplies session bio storage, JSON object and raw-file diagnostics, and a session-deletion helper; app/gadget.php supplies the exploitable destructor. These application-specific dependencies materially qualify the claim of application-independent HTTP-only RCE. Docker Compose provides a 64 MiB vulnerable container, a claimed patched control, and an upload-progress-disabled control, all exposed only on loopback. The targets share the application directory, so a dropped webshell can be visible across controls and must not be mistaken for independent exploitation. Apache tuning, mitigation configuration, documentation, licensing, and CI complete the repository. No external callback or exfiltration destination is visible. This is exploit code rather than merely a detector, with no clear evidence of a fake-exploit trap. However, lab.py, remote.py, and stage2_oom.py were partially truncated in the supplied material, and neither execution nor test results were provided, so end-to-end reliability remains unverified. Repository URL, Git reference, and archive size were not supplied; empty metadata strings and size 0 represent unavailable information.VABISMO · Disclosed Nov 20, 2026 · python · php · web · localOperational
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
PHP GroupPhpapplication
FAQ

Frequently asked questions

Is CVE-2026-126714 exploited in the wild?
As of Nov 24, 2026, Mallory has no reports of CVE-2026-126714 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2026-126714?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2026-126714, the earliest disclosed Nov 20, 2026.
Is there a patch for CVE-2026-126714?
Upgrade to PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, or a later fixed release in the applicable branch; PHP 8.6.0 also includes the fix. Alternatively, install a distribution-supported package containing the backported correction.
What products are affected by CVE-2026-126714?
PHP Group Php.
How severe is CVE-2026-126714?
CVE-2026-126714 has a CVSS v4 score of 9.2 (Critical) and an EPSS score of 13.3% (96th percentile) as of Nov 24, 2026.
Activity feed

Recent activity

362 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
security weekNews · Nov 23, 2026phpAfterShell Vulnerability Revives PHP2Shell's Attack Path - SecurityWeekA critical PHP session-file corruption vulnerability rated CVSS 9.2. Interrupted session overwrites can leave fresh data followed by old session content, allowing attacker-controlled data to be interpreted as serialized objects. Remote code execution requires file-backed session storage, control over session data, interruption during writing, subsequent session_start() processing, and a usable deserialization-to-code-execution path. Patches are included in PHP 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36.Read more ↗csirt skNews · Nov 23, 2026Kritické zraniteľnosti PHP | CSIRT.SKCritical PHP session-file partial-overwrite vulnerability, rated CVSS v4 9.2. The default session storage handler updates an existing session file without first clearing it. An interrupted write can combine new session data with an old trailing portion, causing ordinary string bytes to be deserialized as objects. An unauthenticated remote attacker controlling session data and able to interrupt writes can inject arbitrary objects; a suitable application gadget chain can enable remote code execution.Read more ↗btcirtNews · Nov 23, 2026phpAfterShell: Critical RCE in PHP’s Default Session Handler (CVE-2026-126714) - 20261120019 | Bhutan Computer Incident Response TeamA critical race condition in PHP’s default file-based session handler, rated CVSS v4.0 9.2. Interrupted, non-atomic session writes can splice new and old serialized data, causing attacker-controlled strings to be interpreted as PHP objects when the session is subsequently loaded. This enables unauthenticated remote object injection and potentially code execution. Exploitation requires influencing session data and precisely interrupting a write; the finder reports successful remote testing and an end-to-end code-execution chain using PHP-native classes. A harmless object-injection proof of concept is public, while the weaponized chain is withheld. No in-the-wild exploitation has been publicly reported. Fixed releases are PHP 8.2.36, 8.3.37, 8.4.28, and 8.5.13; the October 2026 fixes do not address this vulnerability. Interim mitigations include disabling session upload progress, minimizing untrusted session data, and using an atomic session backend. Disabling upload progress alone does not eliminate the risk.Read more ↗tenable nessus pluginsNews · Nov 23, 2026RHEL 9 : php:8.3 (RHSA-2026:102226) | Tenable®A PHP vulnerability in which partially overwritten session files can lead to remote code execution.Read more ↗
+79 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity103Community discussion across Reddit, Mastodon, and other social sources.