phpAfterShell and PHP's November 2026 Security Release: 18 CVEs, Seven of Them Critical

phpAfterShell and PHP's November 2026 Security Release: 18 CVEs, Seven of Them Critical

PHP released 8.5.13, 8.4.28, 8.3.37 and 8.2.36 on Thursday, November 19. It's a security release on PHP's regular four-week cycle, announced the day before with the warning that "the highest severity is CRITICAL", and it's a big one. The 8.5.13 changelog lists 18 CVEs. Older branches get fewer, because some of the bugs are in code they don't have:

Release CVEs fixed
8.5.13 18
8.4.28 14
8.3.37 13
8.2.36 12

Seven are rated critical, at CVSS 9.2. That sounds alarming after October's PHP2Shell release, and the update shouldn't wait. Most of the critical bugs need a particular server setting or application behavior before they can be reached, and PHP's advisories say which, so you can work out how exposed a server has been since the advisories went public.

The one getting the headlines is the exception. CVE-2026-126714 is a bug in PHP's default file-based sessions, and the researchers who found it, at Depthfirst, have named it phpAfterShell. By their account it works against PHP's default session settings and doesn't need help from the application. There's more on it under session upload progress below.

Nothing has leaked ahead of the fix this time, and we haven't found any report of these bugs being exploited.

The seven critical CVEs

All seven come from PHP's own advisories on GitHub. The titles are PHP's.

CVE PHP's title Branches What it needs
CVE-2026-129289 PHP-FPM request smuggling through an unread HTTP request body All Web server reusing FastCGI connections
CVE-2026-115560 Session serializer mismatch can lead to remote code execution All Session upload progress on, and two session serializers sharing one store
CVE-2026-126714 (phpAfterShell) Partially overwritten session files can lead to remote code execution All The default files session handler and an interrupted write
CVE-2026-129496 Timezone cache use-after-free can lead to remote code execution All A PHP warning at startup, written to an error log file
CVE-2026-129481 Use-after-free after interrupted session shutdown 8.3 and up A fatal error while a session is being closed
CVE-2026-129474 Use-after-free in magic method backtraces can lead to remote code execution 8.5 only Fatal error backtraces that include arguments
CVE-2026-129182 Use-after-free via repopulation of last_fatal_error_backtrace global after shutdown 8.5 only Fatal error backtraces, plus per-directory PHP settings

Two of these, CVE-2026-129481 and CVE-2026-129182, are holes left by October's fix for CVE-2026-109619. If you patched for PHP2Shell, you still need this one.

The rest are rated high or medium:

CVE PHP's title CVSS
CVE-2026-129291 PHP-FPM epoll use-after-free can lead to local privilege escalation 8.8
CVE-2026-127960 Denial of service through folded HTTP response headers 8.7
CVE-2026-128064 Mixed-case HTTPS and FTPS URLs can expose data in plaintext 8.2
CVE-2026-128090 PHAR OpenSSL signature bypass via algorithm downgrade 7.7
CVE-2026-129538 PHP-CGI out-of-bounds read and write during PATH_INFO correction 6.9
CVE-2026-129501 Double free during DOM XML serialization 6.3
CVE-2026-129506 SOAP use-after-free when processing DTD entity references 6.3
CVE-2026-15353 SOAP information disclosure through malformed array dimensions 6.3
CVE-2026-129438 Incorrect RFC 3986 URI serialization for oversized input 6.3
CVE-2026-129292 PHP-FPM status endpoint XSS via unescaped user and script fields 5.3
CVE-2026-48841 Upgrade to uriparser 1.0.3 (8.5 only) —

What to check on your servers

Updating fixes all of it. The checks below tell you whether a server was open to the worst of it between November 19 and the day you updated, and a couple of them are worth changing for good.

FastCGI connection reuse

CVE-2026-129289 is the one we'd look at first. It doesn't need memory corruption or guesswork about addresses, and PHP says it's been there since 5.6.0.

When a web server keeps a FastCGI connection to PHP-FPM open for the next request, PHP has to throw away any part of the previous request body the application didn't read. It didn't always do that. An attacker can send a malformed upload that leaves bytes behind, and if those bytes are shaped like a FastCGI request, PHP-FPM accepts them as a new one. That forged request sets its own SCRIPT_FILENAME and PHP_ADMIN_VALUE, and the advisory shows it using auto_prepend_file to run its own body as PHP code.

It only works when connections are reused. That means nginx with fastcgi_keep_conn on, Apache's mod_proxy_fcgi with enablereuse=on, or an HAProxy FastCGI backend that keeps connections. Neither nginx nor Apache does this by default. To check nginx:

grep -rn fastcgi_keep_conn /etc/nginx/

If that prints nothing, you're on the default. If it finds the directive turned on, PHP's advice is to turn it off until you've updated. Laravel Forge's advisory gives its customers the same command, and tells them to remove the line from their nginx templates too so new sites don't pick it up.

Session upload progress

PHP2Shell already gave a reason to switch session.upload_progress.enabled off. Two of this month's critical bugs run through it as well:

  • CVE-2026-115560 needs upload progress turned on and two different session serializers reading and writing the same sessions. That happens when an application changes session.serialize_handler before session_start(), or when two applications, FPM pools or cron jobs with different settings share a session directory. The advisory reproduced command execution using gadgets from Guzzle and Monolog, two libraries that are in nearly every Magento and Laravel install.
  • CVE-2026-126714, phpAfterShell, is in PHP's default files session handler, which wrote a new session over the old file without truncating it first. If the write was interrupted, the file could end up as half of one session and half of another, and PHP would unserialize that the next time the session was opened. Upload progress is one way to get attacker-controlled data into a session, but not the only one. Session storage in Redis or a database isn't affected by this particular bug.

PHP's advisory describes turning this into code execution with a gadget chain from the application. Depthfirst's write-up goes further. It says the full chain "does not depend on an application-defined gadget class" and uses a memory-corruption bug in a PHP-native class instead, which Depthfirst is holding back for coordinated disclosure. So we can't check that part. Depthfirst also says the request only has to reach PHP as a multipart upload with upload progress enabled, which was PHP's default until this release, and that the endpoint doesn't have to handle uploads or call session_start(). A later ordinary request that opens the same session does the rest.

Depthfirst calls it "a new exploitation path that the php2shell patch did not address". October's fix stopped the original exploit, but the file-write bug underneath was still there.

The update switches upload progress off by default and refuses runtime changes to session settings while it's on. An explicit session.upload_progress.enabled = 1 anywhere in your configuration still overrides that, so check what's actually in effect for the web server's PHP, not just the CLI:

grep -rn upload_progress /etc/php/

Most applications don't use the feature. If grep -r PHP_SESSION_UPLOAD_PROGRESS across your code finds nothing, leave it off.

How this maps onto platforms, as we read the advisories: Magento uses PHP's own session handling, with files as the default save handler unless app/etc/env.php points sessions at Redis or the database. Laravel keeps its own sessions and doesn't use PHP's session extension, so on a server running only Laravel these two bugs don't have a session reader to work with.

PHP 8.5's fatal error backtraces

PHP 8.5 added fatal_error_backtraces, which is on by default, and two critical bugs this month are 8.5-only because of it.

The more interesting one is CVE-2026-129474. A fatal error at the moment PHP enters a __call() or __callStatic() method could collect freed memory into the backtrace, and the demonstrated attack causes that fatal error by sending a request sized to cross memory_limit. The advisory names Laravel facades and Magento's guest shipping estimation as code paths that reach magic methods, and says exploitation of a full Laravel or Magento install hasn't been demonstrated.

The demonstrated attack needs backtraces to include function arguments, which is what zend.exception_ignore_args=0 means. PHP's built-in default is 0, but php.ini-production sets it to 1, and Ubuntu and Debian base their php.ini on the production file. The official Docker php images ship both sample files and use neither until you copy one into place, so a container with no php.ini of its own is running with arguments included. Check what PHP-FPM is actually using:

; php.ini or FPM pool, on PHP 8.5 before 8.5.13
zend.exception_ignore_args = 1
fatal_error_backtraces = 0

Either setting closes the demonstrated path for CVE-2026-129474. Only fatal_error_backtraces = 0 helps with CVE-2026-129182, which also needs per-directory configuration (Apache .htaccess settings, or a web server passing PHP_VALUE to FPM). Restart every worker after changing them. display_errors=0 doesn't help, because PHP builds the backtrace either way.

Warnings when PHP starts

CVE-2026-129496 needs PHP to write a warning to a file-based error_log while it's starting up, for example from an invalid date.timezone or a deprecated session setting. A fresh worker can then read freed memory during its first request. PHP crashed an FPM worker with a crafted request under default limits, and showed code execution locally on FPM and on Apache with mod_php under extra conditions.

Restart PHP-FPM and look at its error log. A server that starts with no warnings doesn't meet the condition. If it does warn, PHP's interim advice is to fix the setting causing it, or send PHP's errors to syslog.

Docker images and the FPM status page

Two more FPM bugs are narrower, but common setups hit them:

  • CVE-2026-129291 lets someone who can already run PHP code in an FPM worker run commands as the FPM master, which is usually root. It needs catch_workers_output = yes, which the official PHP-FPM Docker images turn on. It's a second step after a compromise, so a site that's already been breached some other way is the one at risk.
  • CVE-2026-129292 lets anyone plant JavaScript in the FPM status page through an HTTP Basic auth username, which runs when somebody later opens that page with ?full&html. Restricting the status page to your office IP doesn't stop the planting, because the payload arrives through an ordinary request to the site. If you don't use pm.status_path, there's nothing to do.

Updating

The mechanics are the same as in October, and that post has the longer version. In short: update the package, restart everything running PHP, and check the restart happened after the update.

Ubuntu and Debian backport the fixes without changing the PHP version, so php -v won't tell you anything. Check the package against Ubuntu's CVE page or Debian's tracker:

dpkg -l | grep -E '^ii +php[0-9.]+-(fpm|cli|common)'
Distribution Package Fixed version
Ubuntu 26.04 LTS php8.5 8.5.4-0ubuntu1.6
Ubuntu 24.04 LTS php8.3 8.3.6-0ubuntu0.24.04.14
Ubuntu 22.04 LTS php8.1 8.1.2-1ubuntu2.29
Ubuntu 20.04 LTS php7.4 7.4.3-4ubuntu2.29+esm6 (Ubuntu Pro)
Debian 13 (trixie) php8.4 8.4.28-1~deb13u1
Debian 12 (bookworm) php8.2 8.2.36-1~deb12u1

If unattended-upgrades is on, these may already be installed. Our own Ubuntu 26.04 server picked up the php8.5 update by itself on the morning of November 21 and restarted PHP-FPM. Check /var/log/apt/history.log before assuming either way.

PHP from Ondřej Surý's repository, a hosting panel or an upstream Docker image follows PHP's own numbering, so php -v should show 8.5.13, 8.4.28, 8.3.37 or 8.2.36. Forge's advisory says its automatic security updates don't patch PHP, so Forge servers need updating from the dashboard or over SSH. On Docker, pull the new base image and rebuild.

Then restart PHP-FPM for every installed version (systemctl restart php8.5-fpm and so on), Apache if it runs mod_php, and long-running PHP processes: Magento queue consumers, Laravel Horizon, queue:work and Octane. systemctl status php8.5-fpm should show a start time after the update.

PHP 8.1, 8.2 and 8.6

PHP 8.1 gets nothing this time. Two of the advisories, the FPM privilege escalation and the folded-header denial of service, list it explicitly as affected with no fix, and the others cover every release before 8.2.36. Ubuntu fixed its own php8.1 package on 22.04. Beyond that, the only fix is moving to a supported PHP.

PHP 8.2 reaches end of life on December 31, less than six weeks away. Our Laravel version support and Magento 2.4.6 end-of-support posts cover what an upgrade involves on each platform.

PHP 8.6.0 came out the same day as these fixes. Our PHP 8.6 post covers what changes.

If you'd like help checking or updating your servers, get in touch. We look after PHP servers for Magento, Laravel and WordPress sites.

Frequently asked questions

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 November 19, 2026. Every earlier release on those branches is affected by at least some of the fixes. Ubuntu and Debian ship the same fixes in their own packages without changing the PHP version number.

How many vulnerabilities does the November 2026 PHP release fix?

It depends on the branch. PHP's changelog lists 18 CVEs for 8.5.13, 14 for 8.4.28, 13 for 8.3.37 and 12 for 8.2.36. Seven of the 18 are rated critical at CVSS v4.0 9.2.

What is phpAfterShell?

The name the researchers at Depthfirst gave to CVE-2026-126714, a critical bug in PHP's default file-based session handler, fixed on November 19, 2026 in PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36. An interrupted session write could leave a file mixing two sessions, which PHP then unserializes. Depthfirst says it chained this with a memory-corruption bug in a built-in PHP class to run code remotely, with no gadget from the application. It hasn't published that second bug. PHP rates CVE-2026-126714 CVSS v4.0 9.2.

Is phpAfterShell a bypass of the PHP2Shell fix?

Partly. Depthfirst describes it as a new exploitation path that October's PHP2Shell patch did not address: that patch stopped the original exploit, but the session file bug underneath was still there. A server patched for PHP2Shell in October still needs the November release.

What is CVE-2026-129289?

A request smuggling bug in PHP-FPM, present since PHP 5.6.0. When the web server keeps FastCGI connections open between requests, leftover bytes from one request body can be read as a second request that the web server never sent. PHP says that lets an attacker with no account run PHP code. Standard nginx and Apache setups close the connection after each request and aren't affected by the demonstrated attack.

How do I check whether my server uses fastcgi_keep_conn?

Run grep -rn fastcgi_keep_conn /etc/nginx/ on the server. If nothing comes back, nginx is using its default, which is off. On Apache with mod_proxy_fcgi, look for enablereuse=on in the proxy configuration. If either is on, turn it off until PHP is updated.

Does my Magento, Laravel or WordPress code need to change?

No. All of these are bugs in PHP, and the fix is updating PHP and restarting it. Some settings decide how exposed a server was in the meantime, such as connection reuse, session upload progress and, on PHP 8.5, fatal error backtraces. PHP's advisory for CVE-2026-129474 names a Laravel facade and a Magento guest shipping API as code paths that reach the vulnerable code, but says full exploitation of either hasn't been demonstrated.

Is the November 2026 PHP release being exploited?

We haven't found a report of exploitation as of November 22, 2026. Unlike October's PHP2Shell release, the details didn't leak before the fix. PHP announced the release a day ahead and published the advisories when it shipped.

Is PHP 8.1 affected?

Yes. PHP 8.1 is no longer supported, gets no new release, and PHP's advisories list it as affected with no fix. Ubuntu has fixed its own php8.1 package on 22.04. Otherwise the fix is moving to a supported PHP version.

Work with Emyrix

Want someone to check your PHP servers?

Tell us what you host and where. We'll check the PHP packages and the settings these advisories depend on, update what needs updating, and restart what needs restarting.