TLDR

  • The PHP Foundation released fixes for eight vulnerabilities, seven rated critical at 9.2 on the CVSS scale.

  • Patched versions are PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0.

  • A flaw called “phpAfterShell” can turn an interrupted session file write into a path to remote code execution.

  • Several bugs only work under specific server setups or non-default settings.

  • Admins who cannot patch right away are advised to turn off session upload progress.


The PHP Foundation has released security updates for eight vulnerabilities in the widely used web programming language. Seven of the flaws carry a CVSS severity score of 9.2, and one is rated 8.8.

The fixes cover every supported branch of PHP. The patched versions are 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0.

Project maintainers issued an advance notice before the release. That notice warned that all supported versions were affected under certain conditions, such as non-default settings or uncommon server setups.

If exploited, the bugs could allow remote code execution, memory corruption, session corruption, denial of service or local privilege escalation. Many of them require specific conditions before an attack can work.

How an Interrupted Write Becomes an Attack

One flaw, tracked as CVE-2026-126714, has been named “phpAfterShell” by security firm Depthfirst, whose researcher Yuhang Wu explained how it works. It is a time-of-check time-of-use bug tied to how PHP saves session data to disk.

The problem starts when a PHP worker stops during a session file update. The worker may die while writing, or after writing but before the old content is cleared.

In both cases, the file can end up holding the start of new session data and the end of old data. An attacker who sets the right length values can make PHP read leftover bytes as separate session entries and objects.

Nothing has to happen right away. The attacker leaves the bytes on disk and waits for the application to call session_start(), when PHP loads and deserializes the altered data.

Chained with a memory bug in a built-in PHP class, this can lead to code running on the server. The attack also requires an application with a suitable deserialization gadget chain.

The flaw affects any application running a vulnerable PHP version with file-based sessions. It is fixed in all five new releases.

The Other Critical Bugs

CVE-2026-115560 is an input validation flaw that could allow code execution, file changes, session corruption or denial of service. CVE-2026-129496 could let an unauthenticated remote attacker crash PHP workers or run code with their privileges.

CVE-2026-129289 involves inconsistent handling of HTTP requests. It requires a front end that keeps backend connections open, such as nginx with fastcgi_keep_conn on, plus an app that opens “php://input” without reading it fully.

Several other use-after-free bugs could lead to code execution or memory corruption. CVE-2026-129182 could allow full remote code execution, while CVE-2026-129481 could break session cleanup and crash a reused worker.

CVE-2026-129474 affects PHP 8.5 and later and depends on the application. An attacker would need enough control over request data to shape memory, a reachable magic method call and a fatal error at the right point.

The lower-rated flaw, CVE-2026-129291, could allow local privilege escalation. It requires local code execution in an FPM worker, the catch_workers_output setting, the epoll event backend and control over worker lifetimes.

Fixes for CVE-2026-129182 and CVE-2026-129474 are only in PHP 8.5.13 and 8.6.0. CVE-2026-129481 is fixed from 8.3.37 onward, and the other five flaws are fixed in all five new releases.

Users on the 8.2.x, 8.3.x, 8.4.x and 8.5.x branches are advised to update to the latest release. Those who cannot patch right away are advised to turn off session upload progress.