phpAfterShell (CVE-2026-126714): What We Know So Far

phpAfterShell (CVE-2026-126714): What We Know So Far

Published: 19 November 2026 | Last Updated: 19 November 2026, UTC

phpAfterShell is a critical vulnerability in PHP's file-based session handling, tracked as CVE-2026-126714. Discovered by depthfirst researchers, it can cause corrupted session data to be deserialized as attacker-controlled objects, potentially leading to remote code execution (RCE). PHP released fixes on 19 November 2026.

At a Glance

CVECVE-2026-126714
Affected ProductPHP 8.2–8.5 with the built-in file-based session handler
SeverityCritical, 9.2 (CVSS v4.0)
Exploitation StatusRCE demonstrated by researchers; no verified in-the-wild exploitation identified in the checked sources as of 19 November 2026
Public ExploitTechnical proof and RCE demonstration published; full RCE chain not publicly disclosed
Patch AvailableYes

What Is phpAfterShell?

PHP's default files session handler updates an existing session file in place. If a worker is interrupted during the write, the resulting file may contain the beginning of one session and the leftover end of another. A subsequent session_start() can interpret that combination as serialized objects chosen by an attacker.

The technical research describes ways to reach this condition through session upload-progress handling, including before application code begins executing. The researchers also demonstrated RCE by chaining the session corruption with a PHP-native deserialization flaw, without relying on an application-specific gadget. Details of that final chain remain withheld.

Exploitation is conditional: an attacker must influence session data, cause a write to stop at a useful point, and have the resulting data read and deserialized. An affected PHP version alone does not prove a particular application can be remotely compromised.

Who Is Affected?

The issue affects PHP applications using session.save_handler=files, PHP's default session storage backend. The PHP security advisory confirms these supported branches and fixes:

Affected PHP VersionsFixed Version
8.5 before 8.5.138.5.13
8.4 before 8.4.288.4.28
8.3 before 8.3.378.3.37
8.2 before 8.2.368.2.36

Applications storing sessions in Redis, a database, or another non-file handler are not affected by this specific file-write flaw. Older PHP branches are end-of-life; organizations running them should verify any vendor-maintained backports and plan migration.

Importantly, PHP's 21 October security releases do not fix phpAfterShell. This is separate from the vulnerabilities commonly called PHP2Shell.

Is phpAfterShell Being Exploited in the Wild?

As of 19 November 2026, the sources reviewed establish a researcher-demonstrated exploit, not confirmed exploitation against real-world victims. The technical write-up contains a demonstration of successful RCE in a test environment. This does not establish that attackers are using CVE-2026-126714 in the wild.

Previdian's honeypot network has not yet seen any exploitation of this vulnerability.

Is a Patch or Mitigation Available?

Yes. Upgrade to PHP 8.5.13, 8.4.28, 8.3.37 or 8.2.36, as appropriate, and ensure updated runtimes are actually deployed and restarted.

If an immediate upgrade is impossible, disable session upload progress at the server or PHP configuration level, then restart the workers:

session.upload_progress.enabled = 0

This blocks an important route into the defect but does not fix it. Applications that independently store attacker-controlled values in file-based sessions can remain exposed.

What Should Defenders Do?

  1. Inventory deployed PHP runtimes, including containers, embedded applications and externally accessible services. Check the version running in production, not only repository declarations.
  2. Check session configuration, especially session.save_handler and whether upload progress is enabled in the web-serving PHP configuration.
  3. Prioritize the fixed releases and validate the deployment after restarting PHP workers or rebuilding images.
  4. Review suspicious patterns such as repeated multipart uploads with PHP_SESSION_UPLOAD_PROGRESS, abnormal worker termination and session-file corruption. These are investigation leads, not proof of this exploit.

What Remains Unknown?

The prevalence of exploitable configurations and any real-world exploitation of this specific CVE remain unconfirmed in the sources checked. The researchers have also withheld key details of their PHP-native RCE chain.

Updates

  • 19 November 2026, UTC: Initial publication following depthfirst's disclosure and the release of PHP fixes.

References

Stay Ahead of Emerging Vulnerabilities

Previdian connects early warning with exposure checks and available temporary defences for enterprise security teams. Request a demo to see how the platform supports vulnerability response.