The PHP programming language development team has released urgent security updates to address a critical vulnerability dubbed phpAfterShell, identified as CVE-2026-126714, with a CVSS severity score of 9.2. This vulnerability highlights once again the risks associated with handling session files in PHP environments.
How the vulnerability works
The vulnerability arises from the way PHP handles overwriting session files; the language writes from the beginning of the file without clearing it beforehand. If the write process is interrupted—whether due to a memory error or intentional action by an attacker—a mixture of new and old data remains in the file. This overlap allows attackers to merge parts of different sessions, leading the system to mistakenly treat corrupted data as a legitimate state, which opens the door to object deserialization attacks and remote code execution (RCE).
Why this news matters
This vulnerability is considered an extension of previous security issues known as PHP2Shell. Although PHP previously imposed restrictions on objects that can be created in memory during upload request processing, these restrictions did not address the fundamental behavior of file updates. The danger lies in the fact that an attacker who can control the data written to a session file can exploit this vulnerability to manipulate session values and bypass security.
What changes in practice?
A successful exploit requires several conditions, including the activation of default session storage, the existence of an exploitation path (such as tracking upload progress), and the termination of the PHP process mid-write. The security updates released by PHP on November 19 included fundamental fixes in versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, and 8.2.36.
System administrators and developers are advised to update their PHP environments immediately to the latest available versions to ensure protection against this attack vector, especially since the vulnerability lies at the core of data processing, which could affect a wide range of PHP-based applications.