PHP patches seven critical flaws, including the phpAfterShell session bug
PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13 fix seven critical memory and session bugs that can lead to code execution, a month after the PHP2Shell emergency releases.
The PHP project has shipped another round of critical security releases, fixing seven flaws that it rates 9.2 under CVSS 4.0. Several could let a remote attacker crash a PHP worker or run code with its privileges. The fixes arrived on November 19, alongside the release of PHP 8.6.0, and come about a month after the emergency PHP2Shell patches of October 21. Those earlier releases do not include these fixes.
What was fixed
- CVE-2026-115560, an input validation bug, fixed in all four supported branches
- CVE-2026-126714, a race in how session data is written, dubbed phpAfterShell
- CVE-2026-129289, a request smuggling-style issue affecting setups that keep FastCGI backend connections open, such as nginx with fastcgi_keep_conn
- Four use-after-free bugs: CVE-2026-129182, CVE-2026-129474, CVE-2026-129481 and CVE-2026-129496, some of which affect only newer branches
phpAfterShell
Researchers at Depthfirst found that if a PHP worker is killed partway through writing a session file, for instance by an out-of-memory kill, attacker-supplied serialized data can be left behind and later loaded as objects. In the setup they tested, the upload progress feature writes to the session before any application code runs. Turning that into code execution still depends on a suitable gadget chain in the app. No attacks using it have been reported. The fixed releases also switch upload progress off by default, so apps that rely on it will need to turn it back on.
What to do
Upgrade to PHP 8.2.36, 8.3.37, 8.4.28 or 8.5.13, or move to 8.6.0, and rebuild container images. Check the version actually serving traffic, since distributions often backport fixes without changing version numbers. If you cannot patch yet and do not need upload progress, set session.upload_progress.enabled to 0 and restart workers, though that is only a partial fix. PHP 8.1 and older are end-of-life.
Who's affected
Anyone running PHP 8.2 through 8.5, including WordPress, Drupal, Laravel and other PHP apps, plus container images and hosting platforms that bundle PHP.
What to do
Upgrade to the fixed release for your branch, rebuild containers and restart PHP-FPM. As a stopgap, disable session upload progress, or move session storage to Redis or a database.