phpAfterShell (CVE-2026-126714) and Six More Critical PHP Flaws: Update to PHP 8.5.13 Now
PHP’s 19 November 2026 security release fixes 17 flaws, seven critical, including phpAfterShell in the default session handler. Which versions fix it, why October’s PHP2Shell patch isn’t enough, and what to do today.
9 min read
The short version
- On 19 November 2026 PHP fixed 17 security flaws, seven of them critical (CVSS 9.2). The headline one, CVE-2026-126714 “phpAfterShell”, is in the default session handler that almost every PHP site uses.
- Fixed in PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36, and in the new PHP 8.6.0. Update and restart PHP.
- Patching PHP2Shell in October does not cover this. One of the new flaws is an incomplete fix for PHP2Shell itself.
- No attacks have been reported yet, and the critical flaws need specific configurations. That is a head start, not a pass. PHP 8.1 and older get no fix.
What happened
Four weeks after PHP2Shell, the PHP project has shipped its second emergency-sized security release of the autumn. On 18 November it gave a day’s notice that fixes for “all supported PHP versions” were coming, adding that the critical issues “require either non-default configuration or uncommon setups”. On 19 November it released PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36, each described as a security release, and PHP 8.6.0 on the same day with the same fixes built in.
The changelog lists 18 CVE identifiers across the engine, PHP-FPM, PHP-CGI, sessions, SOAP, DOM, Phar, the date extension and the URI parser. One of those is a bundled library update, which is why most write-ups count 17 flaws: seven critical, four high and six medium. The October release was two flaws in one area. This one is wide.
The seven critical flaws
All seven are rated CVSS 9.2 by the PHP security team. Three are in session handling, two in PHP-FPM and the engine’s error handling, and the rest are summarised below. Links go to the PHP project’s advisories on GitHub.
| CVE | Where | What goes wrong | Affects |
|---|---|---|---|
| CVE-2026-126714 “phpAfterShell” |
Sessions (files handler) | When a session write is interrupted, for example because a worker is killed by a memory or time limit, the new data is written over the old without truncating it. Trailing bytes from the previous session survive and are deserialised on the next read. With a suitable gadget chain in the application, that becomes code execution. This is the default session handler, so it affects most PHP sites. | 8.2 to 8.5 |
| CVE-2026-115560 | Sessions (upload progress) | A serialiser mismatch: session data written with php_binary or php_serialize and read back by the default php handler while upload progress is on. The PHP team pre-announced this one in October and recommended turning upload progress off until this release. |
8.2 to 8.5 |
| CVE-2026-129481 | Sessions (shutdown) | A fatal error inside a callback during session cleanup leaves a stale pointer behind. This is an incomplete fix for PHP2Shell’s CVE-2026-109619, which is why October’s patch doesn’t cover it. | 8.3 to 8.5 |
| CVE-2026-129289 | PHP-FPM | Request smuggling. If the front-end web server keeps FastCGI connections open to PHP-FPM and a script opens php://input without reading all of it, the unread body is treated as the start of the next request. An unauthenticated attacker can then run PHP code. Standard setups that close the connection after each request aren’t affected by the demonstrated attack. |
8.2 to 8.5 |
| CVE-2026-129496 | Date | A use-after-free in the timezone cache, triggered when PHP writes a startup warning or deprecation to a file-based error log, such as an invalid date.timezone. It crashes fresh PHP-FPM and mod_php workers, and the PHP team showed code execution under extra conditions. |
8.2 to 8.5 |
| CVE-2026-129474 | Engine | A fatal error inside __call() or __callStatic() leaves freed arguments in the backtrace. A confirmed code-execution chain exists, but it needs known memory addresses, and zend.exception_ignore_args=On (which php.ini-production sets) blocks that path. |
8.5 only |
| CVE-2026-129182 | Engine | The record of the last fatal error’s backtrace is repopulated after shutdown, so stale data from one request can carry into the next request on the same worker. The same class of bug as PHP2Shell’s CVE-2026-109619. | 8.5 only |
Below critical, the ones worth knowing about are a PHP-FPM use-after-free that lets a compromised worker escalate to the FPM master process, which usually runs as root (CVE-2026-129291, high, needs catch_workers_output on); a denial of service through folded HTTP response headers in the HTTP stream wrapper (CVE-2026-127960, high); mixed-case HTTPS:// and FTPS:// URLs being sent in plaintext (CVE-2026-128064, high); and a Phar signature bypass (CVE-2026-128090, high). The medium-rated flaws are in PHP-CGI, DOM, SOAP, the URI extension and the PHP-FPM status page.
Am I affected?
If you run PHP 8.2 to 8.5 and haven’t updated since 19 November 2026, yes, to some degree. Which of the seven critical flaws apply depends on your configuration:
- Everyone using PHP sessions with the default
fileshandler (which is the default, so ifsession.save_handlerisn’t set, that’s you) is in scope for phpAfterShell. The attacker needs some influence over what goes into the session, such as a username or search term, and the application needs a gadget chain, which popular libraries such as Guzzle and Monolog have provided in the past. - PHP-FPM behind nginx or Apache is in scope for request smuggling if the proxy reuses connections (
fastcgi_keep_conn onin nginx,enablereuse=onin Apache). Many high-traffic setups turned this on for performance. - PHP 8.5 gets the two engine flaws on top. If you’re on 8.5, that’s two more reasons to be on 8.5.13.
- Any server with a startup warning in its PHP log is in scope for the timezone flaw. If your error log fills with a deprecation on every worker start, fix that as well as updating.
| You run | Fix available? | What to do |
|---|---|---|
| PHP 8.5 | Yes: 8.5.13 | Update now. Two of the critical flaws affect 8.5 only. |
| PHP 8.4 | Yes: 8.4.28 | Update now. |
| PHP 8.3 | Yes: 8.3.37 | Update now. |
| PHP 8.2 | Yes: 8.2.36 | Update now. This is one of the last security releases 8.2 will get: it reaches end of life on 31 December 2026. |
| PHP 8.1, 8.0 or 7.4 | No official release. Some hosting vendors are backporting to their own packages. | Mitigate today (below), then upgrade to a supported version as a priority. |
| PHP 7.3 or older | No | Mitigate or take offline, and upgrade. |
If you only patched PHP2Shell last month, you are on 8.5.12, 8.4.27, 8.3.36 or 8.2.35. Those releases don’t contain any of this. You need to go round again.
What to do today
1. Find out which PHP you’re really running
# The PHP version the web server is actually using (CLI and FPM can differ)
php -v
php-fpm8.3 -v # adjust to your FPM binary
# On Debian/Ubuntu: is the distro security update installed?
apt list --upgradable 2>/dev/null | grep -i php The command-line php and the PHP that serves your website are often different builds. A phpinfo() page (deleted straight afterwards) shows what the web server actually uses. On Ubuntu and Debian the distribution backports fixes into its own version numbers, so “8.3.6” from Ubuntu can be fully patched. Check your distribution’s security tracker for the November advisory rather than looking for 8.3.37.
2. Update and restart
# Debian/Ubuntu with distro or ondrej/php packages
sudo apt update && sudo apt install --only-upgrade 'php*'
# Then restart every PHP process: old workers keep running old code
sudo systemctl restart php8.3-fpm # or: sudo systemctl restart apache2 The restart matters. PHP-FPM and Apache keep long-running workers, and a worker started before the update is still running the vulnerable code. Several of this month’s flaws are specifically about state leaking from one request to the next on the same worker, so a half-restarted pool is exactly the wrong place to be. On shared or managed hosting, ask your host to confirm their PHP is patched; the good ones published fixed packages within hours.
You don’t have to move to PHP 8.6 to get the fixes. The branch releases are drop-in patch updates. Moving to 8.6.0 is a minor-version upgrade that deserves testing first, so do it separately.
3. If you can’t update today, apply the interim mitigations
These block the demonstrated attack paths for the critical flaws. None of them replaces the update, and turning off upload progress is at best a partial measure for phpAfterShell: it closes the most likely path, not the flaw.
; php.ini, or the FPM pool / Apache config (not .user.ini or ini_set())
session.upload_progress.enabled = 0 ; session flaws (CVE-2026-115560, partly -126714)
zend.exception_ignore_args = On ; backtrace flaw on PHP 8.5 (CVE-2026-129474)
fatal_error_backtraces = 0 ; PHP 8.5 only (CVE-2026-129182) Set these where the application can’t override them. For PHP-FPM, use php_admin_value in the pool configuration, and turn off worker output capture while you’re there:
; /etc/php/8.3/fpm/pool.d/www.conf
php_admin_value[session.upload_progress.enabled] = 0
; Turn off worker output capture unless you need it (CVE-2026-129291)
catch_workers_output = no If your web server reuses FastCGI connections to PHP-FPM, turn that off until you’ve updated:
# nginx: don't reuse FastCGI connections to PHP-FPM (CVE-2026-129289)
fastcgi_keep_conn off;
# Apache mod_proxy_fcgi: same thing
SetHandler "proxy:fcgi://127.0.0.1:9000"
# ...and remove, or set off, any enablereuse=on on that proxy Then restart every worker. Settings in .user.ini or ini_set() are applied too late to help. And clear any startup warnings from your PHP error log, since a warning on worker start is the trigger for the timezone flaw.
4. Check for compromise, even without a reported attack
No attacks using the November flaws have been reported at the time of writing. The October flaws were being used within two weeks, and both are now in CISA’s Known Exploited Vulnerabilities catalogue. If your server was unpatched for PHP2Shell at any point, look for unfamiliar PHP files in upload and cache folders, new admin users, unexpected scheduled tasks and outbound connections from the web server. If you find something, an NCSC-assured incident response provider can help.
Two critical releases in four weeks. Expect a third.
In October we wrote that more PHP vulnerabilities were coming, because AI-assisted auditing had found PHP2Shell and the people doing it said they weren’t finished. Four weeks later, here are seventeen more, found across the engine, the session layer and PHP-FPM. Several are variants of the October bugs. That pattern, where one disclosure teaches researchers where to look next, usually produces a third round.
The sites that handled this one in minutes were on a supported PHP version, knew which servers ran PHP, and had someone able to update and restart. For them, 19 November was a package update and a restart. For sites on PHP 8.1 or older, it was another day of choosing between vendor backports, configuration workarounds and hoping. For sites on 8.2, this release is a reminder that the fixes stop on 31 December 2026, six weeks from now.
If you’re upgrading anyway, go straight to PHP 8.5. It gets security fixes until the end of 2029, and the work involved is mostly finding deprecated code, which Rector and PHPStan do for you. What takes judgement is the order and the testing, and that’s a far better conversation to have in a planned week than on the afternoon of the next security release.
Frequently asked questions
What is phpAfterShell?
phpAfterShell is the name given to CVE-2026-126714, a critical flaw in PHP’s default file-based session handler, published on 19 November 2026. If a session write is interrupted, bytes from the old session can be left behind and deserialised later, which can lead to code execution. It is fixed in PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36, and it is one of seven critical flaws in that release.
I patched PHP2Shell in October. Am I covered?
No. The October releases (8.5.12, 8.4.27, 8.3.36 and 8.2.35) do not contain the November fixes. One of the new flaws, CVE-2026-129481, is an incomplete fix for a PHP2Shell issue. You need the 19 November release, then a restart of every PHP process.
Which PHP versions fix the November 2026 vulnerabilities?
PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36, all released on 19 November 2026. PHP 8.6.0 shipped the same day and includes the fixes too. Linux distributions backport fixes into their own package versions, so on Ubuntu or Debian install the security update for your PHP package and check the advisory rather than the version number.
Is PHP 8.1, 8.0 or 7.4 affected?
PHP 8.1 and older no longer receive updates from the PHP project, so there is no official fix. The session flaws have been reproduced on versions back to PHP 5.4. Some hosting vendors are backporting fixes to their own PHP 7.4, 8.0 and 8.1 packages, but the only lasting answer is to move to a supported version.
Are these flaws being exploited?
As of 19 November 2026, nobody has reported attacks using the November flaws, and none is in CISA’s Known Exploited Vulnerabilities catalogue. PHP2Shell went from release to real attacks within two weeks, and the PHP project says the critical issues need non-default configuration or uncommon setups. Treat that as time to patch properly, not a reason to wait.
This article reflects the PHP security advisories as of 20 November 2026. Severity ratings and affected configurations are taken from the PHP project’s advisories and the analyses published by php[architect], Chainguard and Wiz on release day; some details differ between sources. Check the PHP security advisories for the latest.
How we can help
- Emergency PHP security patch Hit by the phpAfterShell or PHP2Shell alerts? We patch your server to PHP 8.5.13 (or the fixed release for your branch), restart it and confirm in writing. £245 fixed, same or next working day.
- PHP 7.4 upgrade Still on PHP 7.4? Get to PHP 8.5 in tested, reviewable steps, past the PHP 8.0 and 8.1 changes that break most sites.
- WordPress PHP upgrades Host forcing a PHP upgrade? We fix or replace the themes, plugins and WooCommerce code that break on PHP 8.5.
- White-label upgrades for agencies Overflow capacity for agencies: we upgrade your client estate under your name, in your repos, under NDA.