who we are

security expertise, democratized

A close-knit team of experienced security professionals with a shared conviction: real security expertise should be accessible to every organization, not just those with enterprise budgets.

PHP's November Security Release: phpAfterShell and Six More Critical Flaws to Patch Now
← back to insights
InsomniSec Team · November 19, 2026

PHP, the language behind roughly 70% of the world's websites, released security updates today that fix 18 vulnerabilities, seven of them rated critical. Several of the critical flaws can let an attacker run their own code on a web server, and at least two can do so without logging in. There are no reports of attacks yet, but that offered little comfort last month: the PHP2Shell flaws went from patch to confirmed exploitation within days, and attackers have since used them, alongside a Linux privilege escalation exploit, to take full control of servers including firewalls linked to US government-affiliated organizations. Every organization running PHP, directly or inside the products it buys, should plan to update this week. The critical issues depend on particular configurations, so the realistic risk varies by environment; the patch is the same either way.

The fixed versions are PHP 8.5.13, 8.4.28, 8.3.37, and 8.2.36. PHP 8.6.0 also became generally available today. This release is not an emergency patch; it is PHP's regular four-week security cycle, and PHP gave a day's notice on November 18 that the highest severity would be critical. That notice, and the absence of any leak before release, gives defenders a head start that PHP2Shell never offered. This article explains what the flaws are, which setups are actually exposed, a behavior change in the updates that may break features, and what to do in what order.


At a glance

Release PHP 8.5.13, 8.4.28, 8.3.37, 8.2.36 (November 19, 2026); PHP 8.6.0 general availability the same day
Vulnerabilities fixed 18, across the core engine, session handling, PHP-FPM, CGI, and other components
Critical 7, each listed at CVSS 9.2
Headline flaws CVE-2026-126714 (phpAfterShell), CVE-2026-129289 (PHP-FPM request smuggling), CVE-2026-129496 (unauthenticated use-after-free)
Exploitation None reported as of publication
PHP's own caveat Critical issues require non-default configuration or uncommon setups
Behavior change Session upload progress is now disabled by default in the fixed releases

Why this matters after PHP2Shell

Last month's release cycle set the context. CVE-2026-109618 and CVE-2026-109619, together known as PHP2Shell, were memory-safety flaws that allowed unauthenticated code execution through crafted HTTP requests. CISA added both to its Known Exploited Vulnerabilities catalog on October 26. Since then, researchers at Dream have reported that suspected Chinese attackers chained PHP2Shell with a Linux kernel privilege escalation exploit to gain root on 25 servers, including Palo Alto Networks firewalls tied to US government-affiliated organizations, with activity dating back to at least October 23 and targets in the US, Japan, Taiwan, and South Korea. Dream believes the attackers likely retain persistent access.

Today's flaws are different in an important way: they were not leaked before release, and PHP says the critical ones need non-default or uncommon configurations. But attackers spent October building tooling and expertise around exactly this part of PHP. Several of today's fixes sit in the same areas PHP2Shell exposed, namely session handling, session upload progress, and memory safety in the engine. The people who exploited PHP2Shell are well placed to study these patches, and patch diffing is now fast.


The seven critical flaws

All seven are listed at CVSS 9.2. The column that matters most is the one describing what has to be true for an attack to work.

CVE What it is Impact Conditions for exploitation Fixed in
CVE-2026-126714 (phpAfterShell) Race condition in the default file-based session handler Code execution as the PHP worker; tampering with session values Attacker can influence session data, a session write is interrupted, and the application has a usable deserialization gadget chain 8.2.36, 8.3.37, 8.4.28, 8.5.13
CVE-2026-129289 PHP-FPM request smuggling Unauthenticated execution of attacker-controlled PHP code Front end reuses backend connections to PHP-FPM, and the application opens php://input without reading it fully 8.2.36, 8.3.37, 8.4.28, 8.5.13
CVE-2026-129496 Use-after-free in the timezone cache Unauthenticated worker crash or code execution Not detailed publicly 8.2.36, 8.3.37, 8.4.28, 8.5.13
CVE-2026-115560 Session serializer mismatch Code execution, file modification, session corruption, or denial of service Runtime switch of session.serialize_handler plus session upload progress enabled 8.2.36, 8.3.37, 8.4.28, 8.5.13
CVE-2026-129481 Use-after-free during session cleanup Crash of a reused worker, memory corruption, possible code execution Not detailed publicly 8.3.37, 8.4.28, 8.5.13
CVE-2026-129474 Use-after-free involving magic method backtraces Code execution Application-dependent; requires enough control over request data to shape memory, a reachable magic method, and a fatal error at the right point 8.5.13 only
CVE-2026-129182 Use-after-free Memory corruption and possible full code execution Not detailed publicly 8.5.13 only

phpAfterShell (CVE-2026-126714)

phpAfterShell, reported by Depthfirst, is the flaw most likely to draw attacker interest, because it lives in PHP's default session storage. PHP stores each session in a file as a series of names followed by serialized values with length fields. If a write to that file is cut off partway through, the file can end up holding the beginning of the new data and the tail of the old data. By choosing the lengths in the new data carefully, an attacker can make the leftover old text parse as a serialized object, which PHP then loads the next time any page calls session_start().

The attacker's entry point is session upload progress, a feature that writes to the session before any application code runs. A multipart upload containing the progress field is enough to start that write, which means any page that later opens a session can be affected, not just upload pages. To interrupt the write, PHP's maintainers cite a hard memory-limit failure in another thread of a threaded PHP build; Depthfirst's Linux tests used an out-of-memory kill instead. In one fresh run, the planted object appeared on the 11th attempt, a measure of how reliably the setup works rather than how often code execution succeeds.

Two details deserve attention:

  • Code execution needs a second ingredient. Loading an object is not code execution on its own; an application normally needs a suitable gadget chain. Depthfirst's own chain instead used a memory corruption bug in a built-in PHP class, which removes the dependency on the application. Those details are being withheld for coordinated disclosure, and Depthfirst has not said whether today's releases fix that second bug.
  • Code execution is not the only risk. The same technique can overwrite ordinary session values, such as login state, permissions, or CSRF tokens. That is a privilege escalation or account takeover path in its own right.

Sessions stored in Redis, a database, or other back ends are outside this particular defect, though each store's handling of interrupted updates is worth checking separately. The official end-of-life mitigation branches for 7.4, 8.0, and 8.1 are not affected; older unpatched builds are.

PHP-FPM request smuggling (CVE-2026-129289)

This flaw lets an unauthenticated attacker run PHP code of their choosing on servers where the web front end keeps connections to PHP-FPM open and reuses them between requests. Examples given in the reporting include nginx with fastcgi_keep_conn on, Apache mod_proxy_fcgi with enablereuse=on, HAProxy's FastCGI support, and LSAPI. The application must also open php://input without reading it to the end. Standard nginx and Apache setups that do not reuse connections are not affected.

PHP calls this kind of setup uncommon, and for a typical single-site server it is. But connection reuse is a common performance tuning step in high-traffic environments, load-balanced platforms, and managed hosting, which are often the environments with the most to lose. If your teams have tuned PHP-FPM for throughput, check this one specifically.

CVE-2026-115560, now fixed

CVE-2026-115560 was disclosed in an informational advisory on October 23, with PHP choosing to wait for the regular release rather than ship an emergency fix. It requires an application to configure session.serialize_handler as php_binary or php_serialize and then switch it to php with ini_set() before calling session_start(), with session upload progress enabled. The PHP Foundation's executive director described it as needing a "very unlikely combination" of configuration and application code. It is now fixed in all four supported branches. If you applied the session.upload_progress.enabled=0 mitigation in October, you can now patch properly.


The other eleven

The non-critical fixes are still worth knowing about, particularly in shared environments:

  • CVE-2026-129291, a use-after-free in PHP-FPM's epoll handling that could allow local privilege escalation. This matters most on shared hosting and multi-tenant servers, where one customer's code runs beside another's.
  • CVE-2026-128090, a PHAR signature bypass through an OpenSSL algorithm downgrade. Applications that rely on signed PHAR archives to verify code or plugins should treat this as an integrity issue.
  • Further fixes for memory corruption, information disclosure, cross-site scripting, denial of service, and unsafe handling of HTTPS and FTPS URLs.

A behavior change that may break features

To close off the phpAfterShell entry point, the fixed releases now empty the session file before each write and abort if that fails, and they disable session upload progress by default. Applications that show upload progress bars using this feature will need to re-enable it explicitly.

There is a catch in the other direction too. The sample php.ini files still show the old setting commented out, and any php.ini, distribution package, or hosting control panel that explicitly enables upload progress will keep it on after the update. Do not assume the new default applies to your servers; check the effective value.


PHP 8.6 arrived the same day

PHP 8.6.0 reached general availability alongside the security releases and includes the phpAfterShell fix. Most of its changes are new language features, but a few are security-relevant and will be welcome for teams planning their next upgrade:

  • Stricter session defaults: session.use_strict_mode and session.cookie_httponly are now on by default, and session.cookie_samesite defaults to Lax. Test login flows before upgrading if your applications relied on the old defaults.
  • Custom session handlers that do not implement both create_sid() and validateId() are deprecated.
  • Failures are no longer silent: fclose(), file_put_contents(), and copy() now return false when flushing or closing fails, and many functions throw a ValueError on invalid input, including strings containing NUL bytes.
  • Post-quantum key encapsulation in Sodium (X-Wing and ML-KEM-768).

A major version upgrade is a project, not a patch. For this week, the priority is the point releases on your current branch; PHP 8.6 belongs in your roadmap.


What you should do

1. Patch and restart every PHP runtime

Update to 8.5.13, 8.4.28, 8.3.37, or 8.2.36, or apply your distribution's backport, then restart PHP-FPM, Apache, and every long-running PHP worker. Rebuild and redeploy container images rather than patching running containers. Confirm the version actually serving web requests, not just the command-line binary, and note that distribution packages may include the fixes without changing the version number, so check the package changelog for the CVEs.

Prioritize in this order:

  1. Internet-facing servers where the front end reuses PHP-FPM connections (CVE-2026-129289)
  2. Internet-facing servers using file-based sessions with upload progress enabled (phpAfterShell)
  3. Shared hosting and multi-tenant servers (CVE-2026-129291)
  4. Everything else

2. Deal with unsupported PHP

PHP 8.1 and older no longer receive official fixes. Ondřej Surý has released patched packages for unsupported versions back to 5.6, and Aikido has published hardened container images with backported fixes for 5.6, 7.0, 7.1, 7.2, 7.4, and 8.1. These buy time; they are not a plan. Move these systems to a supported branch.

3. If you cannot patch immediately, mitigate

  • Disable session upload progress with session.upload_progress.enabled = 0 in php.ini, an FPM pool, or the server configuration, then restart the workers. This blocks the phpAfterShell entry point and CVE-2026-115560. PHP is clear that it is not a complete fix for phpAfterShell.
  • Turn off backend connection reuse between the web server and PHP-FPM, so connections close after each request. This addresses CVE-2026-129289.
  • Never expose PHP-FPM or LSAPI listeners directly to untrusted networks.
  • Limit untrusted data stored in sessions, and consider moving sessions to a store that replaces records in a single step.

These steps do not cover every flaw fixed today. Treat them as a bridge to patching.

4. Check the products you buy

PHP sits inside a great deal of commercial software, from appliances and storage devices to control panels and security products. The PHP2Shell attacks against firewalls are a reminder that these systems are targets too. Updating the PHP you installed does not fix the PHP inside a vendor product; watch for vendor advisories over the coming weeks and apply them.

5. Watch for early signs of exploitation

No indicators of compromise have been published, because no attacks have been reported. Based on how these flaws work, the following are reasonable things to monitor:

  • Multipart uploads containing the session upload progress field sent to pages that do not handle uploads
  • Clusters of PHP memory-limit errors, out-of-memory kills, or PHP-FPM worker crashes and segmentation faults
  • Session files containing unexpected serialized objects, or session values (such as user roles) changing without a corresponding login or action
  • PHP worker processes starting shells or fetching files with wget or curl, and unexpected outbound connections from web servers

If you were exposed to PHP2Shell in October and have not yet completed a compromise assessment, do that as well. An attacker already inside a server has no need for a new flaw.


Summary

What 18 PHP vulnerabilities, 7 critical (CVSS 9.2)
Most significant CVE-2026-126714 (phpAfterShell, default file sessions), CVE-2026-129289 (unauthenticated PHP-FPM request smuggling), CVE-2026-129496 (unauthenticated use-after-free)
Exploitation None reported as of November 19, 2026
Fix PHP 8.5.13, 8.4.28, 8.3.37, or 8.2.36, then restart all PHP workers; PHP 8.6.0 also includes the phpAfterShell fix
Interim mitigations session.upload_progress.enabled = 0; disable PHP-FPM backend connection reuse; keep FPM and LSAPI listeners off untrusted networks
Watch out for Upload progress is now off by default, which may break progress bars; explicit settings in php.ini or hosting panels override the new default
Unsupported versions Third-party backports exist for 5.6 through 8.1; migrate to a supported branch
Credit phpAfterShell reported by Depthfirst

This month, defenders have something they did not have with PHP2Shell: a fix in hand before anyone is known to be attacking. The configurations that matter most, connection reuse and file-based sessions with upload progress, can be identified quickly, and the patch is routine. Use the head start.

If you need help identifying which of your PHP servers meet the conditions for these flaws, validating that patches and mitigations are actually in effect, or checking whether last month's PHP2Shell exposure left anything behind, get in touch.

← all insights