Security Alert: phpAfterShell and Critical PHP Vulnerabilities (CVE-2026-126714)

Last updated: 20 November 2026. We will update this post as distribution patches are released.
On 19 November 2026 the PHP project released PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36 (and PHP 8.6.0). These releases fix 17 security issues, seven of them rated Critical (CVSS 9.2). Several can lead to remote code execution, meaning an attacker could run their own code on your server through a website.
This follows the critical "PHP2Shell" fixes released on 21 October 2026 (CVE-2026-109618 and CVE-2026-109619). If you skipped that update, this release includes those fixes as well, so you only need to update once.
phpAfterShell (CVE-2026-126714)
The headline issue, which its discoverers call phpAfterShell, was found by the security company Depthfirst using its AI-powered vulnerability research platform. It is a time-of-check time-of-use bug in PHP's default file-based session storage:
- When PHP saves a session, it writes the new data over the old session file without first emptying it.
- If that write is interrupted, the file is left holding the start of the new session followed by the end of the old one.
- When the session is next opened, PHP can unserialize data the attacker chose, which can lead to code execution as the PHP worker.
Exploiting it needs an attacker who can influence what is stored in the session, an interrupted write, and an application containing a suitable "gadget chain". The PHP project's advisory says this needs non-default or uncommon setups. Depthfirst disputes this and says its exploits worked against PHP's default configuration. We recommend treating it as urgent either way.
The fix makes PHP empty the session file before writing to it.
PHP2Shell was also found with AI assistance, and it was exploited widely within weeks of disclosure. Some of the new fixes close gaps that the October patches left open, so servers updated in October still need this update.
PHP runs most of the web, including WordPress, Joomla, Drupal, Magento and Laravel sites, so this affects a very large number of websites.
Who needs to act
- You run your own server (a VPS, dedicated server or anything you manage yourself) with PHP: update PHP now using the steps below.
- You are on a NetOz managed service: you do not need to do anything. See Managed customers below.
- You are not sure: contact us and we will help you check.
The critical vulnerabilities
| CVE | CVSS | What it is | Fixed in |
|---|---|---|---|
| CVE-2026-115560 | 9.2 | Session serializer mismatch, using session upload progress. Can lead to remote code execution, file changes, session corruption or denial of service. | 8.2.36, 8.3.37, 8.4.28, 8.5.13 |
| CVE-2026-126714 (phpAfterShell) | 9.2 | Session files can be left partly overwritten, which can lead to code execution as the PHP worker. Needs attacker influence over session data and a suitable gadget chain in the application. | 8.2.36, 8.3.37, 8.4.28, 8.5.13 |
| CVE-2026-129289 | 9.2 | PHP-FPM request smuggling. Can let an attacker run PHP code where the web server reuses FastCGI connections (see below). | 8.2.36, 8.3.37, 8.4.28, 8.5.13 |
| CVE-2026-129496 | 9.2 | Use-after-free in the timezone cache. Can let an unauthenticated attacker crash PHP workers or run code on affected setups. | 8.2.36, 8.3.37, 8.4.28, 8.5.13 |
| CVE-2026-129481 | 9.2 | Use-after-free after an interrupted session shutdown. Can crash a reused worker or possibly allow code execution. | 8.3.37, 8.4.28, 8.5.13 |
| CVE-2026-129474 | 9.2 | Use-after-free in magic method backtraces. Can lead to remote code execution on PHP 8.5. | 8.5.13 |
| CVE-2026-129182 | 9.2 | Use-after-free after shutdown, similar to the October CVE-2026-109619. Possible remote code execution on PHP 8.5. | 8.5.13 |
| CVE-2026-129291 | 8.8 | PHP-FPM use-after-free. Lets code already running in a worker take over the FPM master process, which is often root. Needs catch_workers_output enabled. | 8.2.36, 8.3.37, 8.4.28, 8.5.13 |
PHP 8.6.0, also released on 19 November, includes all of these fixes.
Most of these depend on particular settings or application code. That is not a reason to wait: a hosting server runs many different applications, and you cannot easily rule them all out.
Other fixes in this release
The release also fixes these lower-rated issues:
- CVE-2026-128064 (High):
HTTPS://orFTPS://URLs written in upper or mixed case can be sent without encryption. - CVE-2026-127960 (High): denial of service through folded HTTP response headers.
- CVE-2026-128090 (High): bypass of PHAR OpenSSL signatures.
- CVE-2026-129538: out-of-bounds read and write in PHP-CGI.
- CVE-2026-129506 and CVE-2026-15353: SOAP use-after-free and information disclosure.
- CVE-2026-129501: double free in DOM XML serialization.
- CVE-2026-129292: cross-site scripting on the PHP-FPM status page.
- CVE-2026-129438: URI serialization (PHP 8.5).
PHP-FPM behind NGINX, Apache or HAProxy
CVE-2026-129289 affects servers where the web server keeps connections to PHP-FPM open and reuses them. Examples are:
- NGINX with
fastcgi_keep_conn on; - Apache
mod_proxy_fcgiwithenablereuse=on; - HAProxy FastCGI backends that keep connections open;
- LiteSpeed LSAPI.
If you cannot update straight away, turn off connection reuse on the web server. In NGINX, remove fastcgi_keep_conn on; or set it to off, then reload.
Affected versions
| PHP branch | Fixed version | Support status |
|---|---|---|
| PHP 8.5 | 8.5.13 | Supported |
| PHP 8.4 | 8.4.28 | Supported |
| PHP 8.3 | 8.3.37 | Security fixes only |
| PHP 8.2 | 8.2.36 | Security fixes only, end of life on 31 December 2026 |
| PHP 8.1 and older | No fix | End of life |
If you are on PHP 8.1 or older, the PHP project will not fix these issues. Plan an upgrade to a supported version now. If you are on PHP 8.2, it reaches end of life at the end of next month, so upgrade to 8.3 or later while you are making changes.
Linux distributions often backport fixes without changing the main version number. On Debian, Ubuntu and similar systems, check your distribution's security notice rather than relying on php -v.
Debian patch status
As of 20 November 2026, according to the Debian security tracker:
| Debian release | Package | Status |
|---|---|---|
| Debian 13 (trixie) | php8.4 | Fixed in 8.4.28-1~deb13u1 (DSA-6641-1) |
| Debian 12 (bookworm) | php8.2 | Vulnerable, fix pending |
| forky (testing) and sid (unstable) | php8.4 | Vulnerable, fix pending |
Debian 13 users can update now:
sudo apt update && sudo apt install --only-upgrade 'php8.4*'
sudo systemctl restart php8.4-fpm # if you use PHP-FPM
sudo systemctl restart apache2 # if you use mod_php
Debian 12 users should apply the workarounds below until a fixed php8.2 package is released.
If you install PHP from another repository, such as the packages from deb.sury.org, a control panel such as cPanel, or CloudLinux alt-php, update through that source. For other distributions, see your vendor's advisory, for example Ubuntu or Red Hat.
How to check your PHP version
php -v
The command line can use a different PHP from your website. To see the version the site actually uses, check your control panel. Alternatively, put a temporary file containing <?php echo PHP_VERSION; on the site, load it in a browser, and then delete it straight away.
On Debian and Ubuntu, check the installed package version:
dpkg -l | grep -E '^ii +php[0-9.]+-(fpm|cli|common)'
Workarounds if you cannot update yet
Updating is the only complete fix. Until you can, these settings reduce exposure to the most serious issues:
- Disable session upload progress: set
session.upload_progress.enabled = 0inphp.inior the FPM pool configuration. This helps with CVE-2026-115560, CVE-2026-126714 (phpAfterShell) and the October issues. For phpAfterShell, also avoid storing untrusted data in sessions where you can. Setting it withini_set()in code is too late. - Turn off FastCGI connection reuse in your web server, as described above, for CVE-2026-129289.
- Set
catch_workers_output = noin PHP-FPM pools for CVE-2026-129291. The official PHP Docker images turn this on. - On PHP 8.5, set
fatal_error_backtraces = 0, and make surezend.exception_ignore_args = 1.
Restart PHP-FPM or Apache after changing these settings.
Managed customers
If NetOz manages your server, hosting or application, you do not need to do anything.
- We are reviewing every managed service that runs PHP.
- We are applying fixed PHP packages as soon as Debian and other vendors release them, and will keep doing so as further fixes arrive.
- Where a fix is not yet available, we are applying the workarounds above where appropriate.
- We will contact you directly if a change affects your service, for example a brief restart.
This post will be updated as patches roll out.
Need help?
If you run your own server and would like us to check it, apply the workarounds or update PHP for you, get in touch. If your site runs on PHP 8.1 or older, we can help you plan an upgrade. If you would rather not handle updates like this yourself, our managed services include security patching.
References
- Forbes: AI found a second critical hole in PHP
- PHP security advisories (GitHub)
- PHP 8 ChangeLog
- PHP supported versions
- Debian security tracker: CVE-2026-115560
- Debian security tracker: CVE-2026-129289
- Debian DSA-6641-1 (php8.4)
Update log
- 20 November 2026: First published, including phpAfterShell (CVE-2026-126714). Debian 13 fixed (DSA-6641-1). Debian 12 php8.2 fix pending.
Need a hand with hosting or networking?
NetOz provides VM, managed and email hosting, DNS and colocation from a NextDC Tier IV facility in Adelaide.