Skip to content
PHP Foundation Patches Critical Remote Code Execution Flaws in Multiple Versions

PHP Foundation Patches Critical Remote Code Execution Flaws in Multiple Versions

Beyondmachines • November 19, 2026

The PHP Foundation released security updates to fix eight vulnerabilities, including seven critical flaws that allow unauthenticated remote code execution (RCE). These vulnerabilities affect all supported versions of the PHP language and reside in core components such as the session handler, the PHP-FPM process manager, and the timezone cache. Attackers can exploit these issues to run arbitrary code, escalate local privileges to root, or bypass front-end security controls.

One flaw, tracked as CVE-2026-126714 (CVSS score 9.2) and dubbed "phpAfterShell," involves a non-atomic file write in the default session handler. If a session update is interrupted, PHP leaves a malformed file containing a mix of old and new data. When the application later calls session_start() , it may deserialize attacker-controlled objects, leading to RCE.

Another issue, CVE-2026-129289 (CVSS score 9.2) , allows request smuggling through PHP-FPM. By sending a crafted HTTP request body that is not fully read by the application, an attacker can inject a separate FastCGI request into a persistent connection. This forged request can override administrative PHP settings or execute code, bypassing front-end routing in environments like Nginx or Apache.

Critical vulnerabilities:

CVE-2026-115560 (CVSS score 9.2) - A session serializer mismatch in the session upload progress feature. Attackers can use different serialization formats to trick PHP into interpreting session keys as serialized objects, exposing RCE.

CVE-2026-129182 (CVSS score 9.2) - A use-after-free vulnerability triggered by the repopulation of fatal error backtraces during request shutdown. It allows subsequent requests to access stale memory, leading to potential code execution.

CVE-2026-126714 (CVSS score 9.2) - A time-of-check to time-of-use (TOCTOU) flaw in the file-based session handler. Interrupted writes result in corrupted session files that trigger unauthorized deserialization.

CVE-2026-129289 (CVSS score 9.2) - A request smuggling flaw in PHP-FPM caused by unread HTTP request bodies. It allows unauthenticated attackers to forge FastCGI requests and execute arbitrary PHP code.

CVE-2026-129474 (CVSS score 9.2) - A use-after-free vulnerability in magic method backtraces. Fatal errors occurring during __call() or __callStatic() execution can cause PHP to read freed memory as live arguments.

CVE-2026-129481 (CVSS score 9.2) - A use-after-free vulnerability occurring after an interrupted session shutdown. Stale pointers to script filenames can be accessed by subsequent requests handled by the same worker.

CVE-2026-129496 (CVSS score 9.2) - A use-after-free vulnerability in the timezone cache. Diagnostics written to the error log during startup can leave stale references that attackers can trigger to execute code.

CVE-2026-129291 (CVSS score 8.8) , a use-after-free in the PHP-FPM epoll backend. This flaw allows an unprivileged worker to execute commands with the privileges of the FPM master process, often resulting in root access.

PHP 8.2.x before 8.2.36

PHP 8.3.x before 8.3.37

PHP 8.4.x before 8.4.28

PHP 8.5.x before 8.5.13

Administrators should update to the latest patched version for their respective branch immediately. If patching is not possible, you should disable session upload progress and backend connection reuse in your web server configuration. Organizations should also ensure that PHP-FPM listeners are not exposed to untrusted networks.