Two memory-safety bugs in PHP core, patched on October 21, were already being probed before the fixes shipped. Here is the timeline, the chain that turns them into root access, and a practical response plan.
In 60 seconds
- PHP2Shell covers two critical PHP core bugs, each scored 9.2 under CVSS v4.0, fixed in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
- Exploitation attempts were reported four days before patches shipped, and CISA has listed the flaws as actively exploited.
- Patching alone is not enough: restart PHP workers, rebuild container images, and do not trust version banners as proof of safety.
Some vulnerabilities arrive quietly and are fixed before most people hear about them. PHP2Shell is not one of those. Since the PHP project published emergency security releases on October 21, 2026, the pair of flaws has gone from a disclosure to a proof of concept to confirmed attacks against real servers in barely three days, and the story is still moving.
PHP powers a vast share of the web, including popular content management systems, storefronts and file-sharing platforms. A critical, unauthenticated remote code execution bug in the runtime itself is therefore not an application problem to be handled by one team. It is an infrastructure event. This article walks through what is known so far, what is still disputed, and what administrators should do before the weekend.
What PHP2Shell actually is
PHP2Shell is the nickname researchers use for two separate vulnerabilities in PHP core: CVE-2026-109618 and CVE-2026-109619. Each carries a CVSS v4.0 score of 9.2, which places them firmly in the critical range. Both can allow an unauthenticated attacker to execute code with the privileges of a PHP web worker. The affected code is old; analysis from World Wide Technology notes that the vulnerable logic dates back to the PHP 5.4 era, released in 2012.
The first flaw, CVE-2026-109618, involves how PHP behaves when it runs out of memory during request handling. In the failing path, PHP bails out and leaves memory in an uninitialized state that an attacker can later influence. The second flaw, CVE-2026-109619, is a use-after-free caused by stale global state. A worker can retain a pointer to memory that belonged to an earlier request after that memory has been released, and a later request can then abuse it.
The discovery credit goes to researchers from Calif, OpenAI and Wiz. OffSec’s account says the first flaw was found on August 19, that the researchers used it the next day to take over a Drupal site without a password, and that it worked against WordPress the day after. Calif has also confirmed unauthenticated code execution against a WordPress 7.1.2 installation running a vulnerable PHP version. Those results explain why the security community reacted so strongly: the flaws sit beneath the applications millions of sites run.
A timeline that shrank from months to days
The timeline matters because it shows how quickly defenders lost the lead. The researchers had weeks of quiet before the public disclosure, yet details and some mitigation guidance reportedly leaked, and proof-of-concept exploits appeared before the patches were available. Amazon Threat Intelligence then reported seeing exploitation attempts against its honeypot network four days before the fixes were published.
- Aug 19Researchers find the first flaw, according to OffSec’s account of the discovery.
- Aug 20-21The flaw is reported to work against a Drupal site and then a WordPress site without credentials.
- Oct 17Amazon Threat Intelligence observes an exploitation attempt on its MadPot honeypot.
- Oct 21PHP publishes emergency releases 8.5.12, 8.4.27, 8.3.36 and 8.2.35; Linux distributions such as Ubuntu ship fixes the same day.
- Oct 23PHP discloses a separate, unpatched issue, CVE-2026-115560, with a configuration-based mitigation.
- Oct 24Researchers confirm attackers running commands on vulnerable honeypot servers.
- Oct 26CISA adds both PHP2Shell flaws to its Known Exploited Vulnerabilities catalog.
- Oct 28CISA adds the Linux kernel flaw known as Fragnesia, which attackers can chain with PHP2Shell.
Why a runtime bug is worse than an application bug
Most web vulnerabilities live in application code, where authentication, input validation and access control can limit the damage. A flaw in the runtime sits underneath all of that. Analysis published by AWS Builder Center makes the point clearly: if the bug is triggered while PHP is still processing the request at an early stage, the application’s own login checks and sanitization routines may never get a chance to reject it.
That is why a web application firewall is a useful extra layer but not a cure. Guidance from Hack The Box and others is consistent on this point: filtering rules and outbound controls can reduce exposure or limit the impact of an intrusion, yet none of them replaces updating PHP itself. It also explains why unauthenticated, internet-facing servers are the immediate priority. An attacker does not need an account, a plugin vulnerability or stolen credentials. The runtime does the work.
When the bug lives in the runtime, every application on top of it inherits the risk, however carefully it was written.
The Fragnesia chain: from web shell to root
Remote code execution as a web worker is bad. Remote code execution that ends in root is worse, and that is the scenario CISA highlighted this week. On Wednesday, October 28, the agency added a Linux kernel vulnerability known as Fragnesia, tracked as CVE-2026-46300, to its Known Exploited Vulnerabilities catalog. The flaw stems from a logic bug in how the kernel handles ESP-in-TCP traffic in its XFRM subsystem.
CISA warned that threat actors can chain Fragnesia with PHP2Shell to implant PHP web shells and run commands as root. The security firm Dream reported a complete attack operation built on a custom version of the PHP2Shell chain paired with the kernel privilege escalation, and technical write-ups attribute successful root access to 24 perimeter firewalls and one internal firewall management system. The targets in that campaign were network security devices, which is a reminder that this is not only a story about websites. Appliances, hosting panels and embedded management consoles can all carry PHP in places administrators rarely look, so inventory work should include them.
Researchers have also built exploit variants that get around address space layout randomization, a common memory defense, which suggests that more reliable attacks will keep appearing as the bugs are studied.
Detection is harder than it looks
Teams rushing to assess exposure quickly run into an awkward fact: knowing whether a host is vulnerable is not trivial. The open source scanner released by Searchlight Cyber argues that many scanners circulating in the wild rely on version checks, which only read what a server advertises, and that they do not accurately reflect vulnerable conditions for both mod_php and php-fpm. The researchers add that, because one of the bugs requires triggering an out-of-memory condition, there is no entirely safe way to test for it without provoking that condition. Probing production systems is inherently risky.
There is also an honest disagreement in the public record. Different sources map the session upload-progress use-after-free and a related memory leak to different CVE identifiers. PHP’s own advisories name the upload-progress path under CVE-2026-109619, and that is the mapping this article follows. The practical effect is small, because the fixed versions address both, but anyone building detection rules or compliance reports should check which identifier their tooling expects.
| PHP branch | Fixed release | Notes |
|---|---|---|
| 8.5 | 8.5.12 | One analysis notes that the fatal-error backtrace added in 8.5 is among the sources of stale state |
| 8.4 | 8.4.27 | Update and restart workers |
| 8.3 | 8.3.36 | Update and restart workers |
| 8.2 | 8.2.35 | Update and restart workers |
| Older, end-of-life branches | No official fix | Affected; plan an upgrade or apply vendor backports |
What to do right now
The response order is straightforward. Start with internet-facing systems, then work inward. Update PHP to a fixed release or install your distribution’s patched package, and then make sure the update actually took effect. This is where many teams stumble. A patched package on disk does nothing if long-running php-fpm workers keep the old code in memory, and a rebuilt server does nothing if container images still bundle the vulnerable runtime.
- Inventory every host and container that runs PHP, including appliances, hosting panels and staging servers that are easy to forget.
- Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or install the patched package from your Linux distribution.
- Restart php-fpm, Apache and any other process that serves PHP so that the new code is loaded.
- Rebuild and redeploy container images instead of patching running containers in place.
- Disable session upload progress with session.upload_progress.enabled set to 0 as a temporary guard, which also mitigates the unpatched CVE-2026-115560.
- Apply Linux kernel updates that address Fragnesia, because it turns a web compromise into full system control.
- Hunt for compromise: review web shells, unexpected child processes, new cron jobs and outbound connections dated from mid-October onward.
Do not treat a clean version banner as proof of safety, and do not assume a firewall rule closed the door. Retain evidence of remediation, since auditors and cyber insurers increasingly ask for it, and CISA’s catalog listing means many organizations have formal deadlines.
What it means for WordPress and shared hosting
Site owners who do not manage servers directly are not off the hook. WordPress, Drupal, Magento and Nextcloud are among the many applications that run on PHP, and researchers have demonstrated pre-authentication code execution against WordPress on vulnerable PHP versions. The flaw is in the language runtime, not in WordPress itself, so updating WordPress core, themes and plugins will not fix it.
If you use managed hosting, ask your provider in writing which PHP version is running and when it was patched. Many hosts handle this automatically, but customers on older pinned PHP versions may need to switch versions in their control panel. If you run your own server, check the PHP version shown in your site’s health tools, then confirm it against the command line on the server. Keep backups offline and current. If you find signs of compromise, treat the entire server as untrusted rather than cleaning individual files.
PHP2Shell is a case study in compressed timelines. Researchers found the flaw in August, defenders learned of it in October, and attackers were already poking at it before the patch existed. The window between disclosure and exploitation is now measured in hours, which means patching has to be a rehearsed routine and not a project.
The deeper lesson is about inventory. The organizations that recover fastest are those that already know where PHP runs, who owns each host and how to restart it safely. Build that map before the next emergency release, because there will be one.
Sources & further reading
- Hack The Box – War Room: PHP2Shell
- BleepingComputer – PHP2Shell flaws exploited in the wild
- BleepingComputer – CISA warns of Fragnesia chained in PHP2Shell attacks
- Ubuntu – PHP2Shell fixes available
- Help Net Security – PHP2Shell scanner
- OffSec – Free PHP2Shell lab announcement
- WWT – PHP2Shell technical reference
- Pentest-Tools – PHP2Shell detect, patch, mitigate
Compiled by the Degoot Team from public reporting available at the time of writing. Figures and timelines may change as vendors and investigators publish updates, so check primary sources before acting.
Software News · degoot.com

1 thought on “PHP2Shell: How Two Critical PHP Flaws Became a Race Between Patches and Attackers”