phpAfterShell (CVE-2026-126714) is a reported flaw in PHP’s file-based session handler: an interrupted write can leave old and new serialized data mixed in one session file, which a later read may interpret as altered session state. Depthfirst disclosed the vulnerability on November 19, 2026, and rated it 9.2 under CVSS 4.0. The Hacker News reported fixes in PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0.
Which PHP releases were reported to contain the fix?
The Hacker News reported these releases as containing the phpAfterShell fix:
| PHP branch | Release reported with the fix |
| 8.2 | 8.2.36 |
| 8.3 | 8.3.37 |
| 8.4 | 8.4.28 |
| 8.5 | 8.5.13 |
| 8.6 | 8.6.0 |
The October 21, 2026, PHP2Shell fixes addressed different flaws and did not fix phpAfterShell. NeoTeo covered those earlier issues in its report on the October PHP fixes.
How can an interrupted write change what PHP reads?
PHP can update a file-based session while processing an unauthenticated multipart upload when session upload progress is enabled. Depthfirst’s technical analysis of phpAfterShell describes two distinct ways an interrupted update can leave a mixture of old and new data.
In one path, a process stops during a write. The file may then contain a prefix of the new session data followed by the old data that remains in the file. In the other, PHP finishes writing a shorter replacement session but stops before truncating the file to the new length. The old tail can remain after the new data. The operations involved, including pwrite() and ftruncate(), do not make the whole session update atomic.
A later session_start() can parse the resulting mixture as session records with a different meaning. In the demonstrated path, that can create an object from attacker-influenced bytes. The two write orderings describe different interruption points; they do not make every PHP deployment equally exposed.
Why doesn’t object creation automatically mean code execution?
Deserializing an object is a step in the reported attack path, not a guarantee of remote code execution. Turning that primitive into code execution requires an additional route, such as a suitable application gadget chain or another vulnerability. Depthfirst said its demonstrated code-execution chain used a separate memory-corruption flaw in a PHP-native class.
For a PHP security fix, check the runtime serving web requests and the package’s patch status—not just the version string.
What should PHP operators check?
The reported release list gives operators a branch-specific target. Update to the corresponding fixed release, then check the PHP runtime that actually serves requests. The Hacker News noted that Linux distributions can backport a fix without changing the upstream PHP version string; it also recommended rebuilding and redeploying container images where applicable.
The Hacker News described disabling session.upload_progress.enabled as a temporary mitigation for the upload-progress route, not a replacement for installing a fixed release. That setting does not address other possible ways attacker-controlled data could enter session state.