PHP fixed a critical session flaw. What to ask whoever runs your site
PHP, the software behind many websites, fixed a critical flaw on 19 November. The fix happens on the server, so the question is whether your host installed it.
By VibeLeaderboard
Nov 22, 2026, 12:41 PM UTC
On 19 November 2026, the PHP project published security releases PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13.1 PHP 8.6.0, a new version released the same day, also contains the fixes.24 PHP is the programming language running on the server behind many websites; Cloudflare, which sells website security services, says PHP runs "a large share of the web," often inside content management systems and plugins.2 The releases fix 17 vulnerabilities, seven rated critical.3 The one drawing attention is phpAfterShell, which the security company depthfirst says it found and reported, and which PHP's maintainers rate 9.2 out of 10 for severity.4 According to Glitchwire, a security news site, depthfirst found it using its AI-powered research platform.6 Cloudflare says each of the other six critical flaws needs a specific configuration to be exploitable.2 For a site owner, the questions are whether phpAfterShell reaches their site, how worried to be, and what to ask whoever runs their server.
The fix is an update to PHP on the server, and it takes effect only once PHP is restarted so that every worker process loads the new version.2 Nothing on your site's pages changes. For most small sites, that job falls to a hosting company, a developer or an agency. As of 19 November, no attacks using phpAfterShell had been reported,24 but the technical details are public and Cloudflare says it expects exploit attempts to follow.2
The flaw sits in sessions, the mechanism a site uses to remember you between pages, such as the fact that you are logged in and what you are allowed to do.4 By default, PHP keeps each visitor's session data in a file on the server, reading it at the start of a request and writing the updated data back at the end.2 If that write is cut off partway, the file can hold the beginning of the new data followed by the end of the old. When PHP next reads the mixed file, text an attacker planted in the old data can be rebuilt as working program objects instead of harmless text.5
The worst outcome is remote code execution: an outsider making your server run commands of their choosing. The official description of the flaw lists what that takes. The attacker must be able to influence what goes into the session, for example through session upload progress, a PHP feature that records a file upload's progress in the visitor's session. They must interrupt a write at a suitable point. And the site's code must contain a suitable "gadget chain," existing code the planted objects can set off.54 depthfirst says it reached code execution without such code by combining the flaw with a second memory-corruption bug in a built-in part of PHP. It is holding back that bug's details and has not said whether the November releases fix it.4 The researchers also say the technique can swap ordinary session values, such as who is logged in, before the site checks them.4
How hard this is in practice is disputed. PHP's advance notice on 18 November said the critical issues "require either non-default configuration or uncommon setups."1 depthfirst's chief executive, Qasim Mithani, told Forbes that the exploits work on default configurations, according to Glitchwire.6 The evidence supports parts of both positions. File-based sessions are the default,2 and The Hacker News, comparing PHP's source code, found that upload progress, depthfirst's route for planting data, was switched on by default before these releases.4 Cutting off the write is the harder step. PHP's maintainers name one way, a crash from hitting a memory limit in a particular type of PHP build. In their own Linux tests, depthfirst's researchers deliberately ran the worker out of memory, and the planted object appeared on the 11th attempt. That count measures getting the file into the right state, not how often code execution succeeds.4 No source shows how reliably an outsider could cut off the write on a typical server. Whether a given site is exposed depends on its server settings and what its code keeps in sessions, which your host or developer can check and you probably cannot.
Recent history argues against waiting. PHP fixed two critical flaws known as PHP2Shell on 21 October, and Glitchwire reports they were added to CISA's Known Exploited Vulnerabilities catalog within five days.6 phpAfterShell shares their technique of planting data in session storage,2 and the October releases do not contain the new fix, so a server updated in October is still affected.4
The first question for your host or developer is whether your site runs on PHP at all. If it does not, this flaw does not reach it. If it does, ask which PHP version actually serves the site, and whether it is 8.2.36, 8.3.37, 8.4.28, 8.5.13 or 8.6.0.2 The number alone can mislead: Linux distributions often build fixes into their own packages without changing the version number, so the reliable check compares the full package version with the distribution's security advisory.24 Next, ask whether PHP was restarted, and any container images rebuilt, so the new version is the one answering web requests.24 Finally, ask whether upload progress is still switched on. The update closes phpAfterShell itself by emptying the session file before each write, and it switches upload progress off by default, but a configuration file, distribution package or hosting control panel that turns the feature on keeps it on.4 Where it stays on, a related critical flaw fixed in the same releases remains a concern: every application sharing the same session data must store it in the same format, and the update does not enforce that across separate configurations.3
If the update cannot go in yet, switching off upload progress (where the site does not use it) and limiting the untrusted data stored in sessions reduce exposure without fixing the flaw.24 Servers that switched upload progress off after the October advice still need the update.4
PHP 8.1 and earlier are end-of-life, meaning the PHP project no longer publishes fixes for them, and depthfirst's advice for those versions is to move to a supported one.34 Plesk, which makes hosting control panel software, plans to backport the fixes to 8.1, 8.0 and 7.4 on Linux.3
For sites that sit behind Cloudflare, its web application firewall, a filter that inspects requests before they reach a site, can help in the meantime. Cloudflare says the firewall blocks known phpAfterShell attack patterns on every plan, including the free one, by default. It also calls the firewall "not a replacement for the patch": the attack's final step happens inside PHP as it reads the corrupted file, session data arriving from a database or another system may never pass the firewall in recognizable form, and traffic that bypasses Cloudflare is not inspected.2
On the evidence so far, this calls for a prompt question to your host or developer, not alarm. No attacks had been reported as of 19 November, and PHP's view is that the critical flaws need unusual setups. But the company that found phpAfterShell disputes that view, the method is public, and the related October flaws were exploited within days, according to Glitchwire. A confirmed answer that your server runs a fixed PHP build and has been restarted settles the main risk. If no one can give you that answer, or your site still runs PHP 8.1 or older, that is where to push.
Sources (6)
PHP, Upcoming Critical PHP Security Release; PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13 released, 18 and 19 November 2026.
Back to text ↑Cloudflare, phpAfterShell: critical PHP session flaw and what Cloudflare's WAF covers, 20 November 2026.
Back to text ↑webhosting.today, PHP Fixes 17 Flaws, 7 Critical, 19 November 2026.
Back to text ↑The Hacker News, phpAfterShell Explained: How Hackers Could Turn a PHP Session Flaw Into Code Execution, 19 November 2026.
Back to text ↑Debian security tracker, CVE-2026-126714: official description and package status, accessed November 2026.
Back to text ↑Glitchwire, PHP Ships Second Emergency Patch in a Month as AI-Discovered Flaw Joins Incomplete PHP2Shell Fixes, 19 November 2026.
Back to text ↑
Related Intel (5)
- phpAfterShell Explained: How Hackers Could Turn a PHP Session Flaw Into Code Execution
- Upcoming Critical PHP Security Release, and PHP 8.2.36–8.5.13 security releases
- PHP Ships Second Emergency Patch in a Month as AI-Discovered Flaw Joins Incomplete PHP2Shell Fixes
- CVE-2026-126714: partially overwritten PHP session files (Debian security tracker)
- PHP Fixes 17 Flaws, 7 Critical
Checking sign-in…
Loading comments…