What happened
On October 21, 2026, the PHP project released PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, saying they "fix two critical vulnerabilities that can allow unauthenticated remote code execution." Both are memory-safety bugs (CWE-416) in how PHP cleans up after a request fails partway through:
- CVE-2026-109618, "RCE via OOM corruption": when PHP runs out of memory, it can abort a request while internal data is only partly initialized, and the cleanup step then treats that data as valid.
- CVE-2026-109619, "RCE via stale global state": internal state from one request can survive after its memory is freed, and a later request handled by the same worker can use it.
PHP scores both CVSS v4.0 9.2, and NVD scores them CVSS 3.1 9.8. The advisory says
every PHP installation serving web requests is at risk, including PHP-FPM, Apache with mod_php,
php-cgi, FrankenPHP and LiteSpeed. Risk is highest for mod_php, "with a demonstrated exploit where an
unauthenticated request can trigger the attack before any application code runs." According to
PHP's GitHub advisories, full code execution was validated against mod_php with default limits, and
the session path in CVE-2026-109619 was validated against both mod_php and PHP-FPM. Session upload
progress is enabled by default, and the application does not need to call
session_start().
Wiz Research, Calif and OpenAI found and reported the bugs. Wiz, which named them PHP2Shell, says AI models helped find them and build the exploit. It says every PHP version from the last decade, back to 5.4, is affected, and it demonstrated exploit chains against WordPress, Drupal and Joomla. Disclosure was planned for October 22, but details leaked early: The Hacker News reports that Calif mistakenly posted a video of its working proof of concept on October 20.
Attacks did not wait. Amazon says its MadPot honeypots saw an attempt on October 17 and more from multiple actors on October 21, and that PHP2Shell "is now being broadly exploited in the wild," although "it's unclear if any of these attempts would have succeeded." Cloudflare's Matthew Prince told SecurityWeek it saw "thousands of attempts" in the ten hours before disclosure. watchTowr says the exploits being sprayed so far "either don't work at all, test for timing-based differences, or crash the target." Fake proof-of-concept repositories, some carrying malware, have also appeared on GitHub.
Update, October 28. Successful exploitation was confirmed on honeypots on October 24. Adel Karimi of Perplexity recorded 35 successful shell executions across three honeypots, from two IP addresses, The Register reported; BleepingComputer quotes him calling it "confirmed RCE with usable memory disclosure, not just a crash followed by a suspicious process." The honeypots ran Apache with mod_php in what he called an "intentionally favorable single-worker mod_php profile," on PHP 8.4.26, and no further malware was downloaded. On October 26, CISA added both CVEs to its KEV catalog with a federal due date of October 29, and updated its alert: organizations that cannot update, or run PHP 8.1 or earlier, "should take PHP-based systems offline until they can be patched or updated." CISA has not said how many production systems were breached. Exploitation is still hard to do reliably: VulnCheck counts hundreds of proof-of-concept repositories, of which "only a very small number have been legitimate exploits," and the one public exploit that bypasses ASLR worked only against PHP 8.4.26. Mirai botnet operators have joined in, though Sophos says the attempt it saw was stopped. Separately, on October 23 PHP disclosed a third, unpatched bug in the same area (CVE-2026-115560) that needs an unusual configuration, and now advises turning off session upload progress until the next regular release.
Update, October 29. On October 26, the security firm Dream published the first detailed account of real-world compromises. An attacker using a custom PHP2Shell exploit, "not a copy of any known public exploit," rooted 25 servers across the United States, Japan, Taiwan and South Korea, most of them firewalls running "a large vendor's firewall software" that Dream did not name. The PHP bug gave code execution as an unprivileged user, and the attacker chained the Linux kernel flaw CVE-2026-46300 (Fragnesia) to become root, then planted a small PHP web shell. Dream says the first of two firewalls at a US government-affiliated organization was rooted on October 23, so exploitation in production began before the honeypot results above. CISA added Fragnesia to KEV on October 28; our Fragnesia post covers the kernel fix.
Why it matters if you run public infrastructure
PHP runs a large share of the web: Censys counted about 2.58 million internet-facing PHP hosts, of which roughly 1.57 million were unpatched, per SecurityWeek. Unit 42 puts the number of potentially vulnerable instances at over 22.6 million. VulnCheck counts at least a million on end-of-life versions, which get no official fix. The flaw is in the language runtime, not in your code, so a well-maintained application on an old PHP build is as exposed as a neglected one. Appliances count too: Palo Alto Networks says all PAN-OS and Panorama versions are affected, with fixes still pending, Help Net Security reported. The UK NCSC advises taking any system offline that cannot be fixed right away.
What to check this week
- Find every PHP install you expose, including old marketing sites, WordPress
installs, admin panels and appliances with a PHP web interface. Run
php -von each server, and check the version used by the web server too, since the CLI and the FPM or Apache module can differ. - Update. Upstream: 8.5.12, 8.4.27, 8.3.36 or 8.2.35. On a distribution package, install your vendor's fixed build (for example Debian DSA-6574-1 for php8.4 and DLA-4848-1 for php8.2). The fixed package may keep the old version number with a new build suffix. PHP warns that the volunteer-run remirepo did not have updates on day one. Restart every PHP worker afterwards.
- Plan for PHP 8.1 and older. The PHP project no longer ships releases for them. It published minimal source patches for 7.4, 8.0 and 8.1, and some LTS vendors offer backports. Otherwise, upgrade to a supported version or take the site offline.
- If you cannot update today, reduce exposure. PHP's stopgaps "do not make an
installation safe," but they block the known paths. For CVE-2026-109618: set
memory_limit=-1where applications cannot override it, and set a lowpost_max_size(8M without uploads, 32M with). For CVE-2026-109619: setsession.upload_progress.enabled=0(not viaini_set()or.user.ini), and on PHP 8.5 setfatal_error_backtraces=0, then restart every worker. A WAF helps: Cloudflare enabled managed rules for all plans on October 21, and AWS WAF updated its PHP rule group. Since October 23, PHP recommendssession.upload_progress.enabled=0even on patched versions, until its next bugfix release. - Look for signs of attack. Wiz suggests watching for unusual multipart requests
followed by memory-limit errors or bursts of HTTP 500s, oversized or malformed
PHPSESSIDcookies, and unexplained worker restarts. Datadog points to "Allowed memory size ... exhausted" errors reported on "Unknown on line 0," and shells spawned by web server processes. CISA's alert gives the same signal: "PHP worker processes launching shells or downloading tools." - Patch the kernel too. In the attacks Dream investigated, PHP2Shell was the way in
and the Fragnesia kernel flaw made it root. Install your distribution's fixed kernel and reboot, and
check that
/etc/pam.d/suhas not been altered. Details in our Fragnesia post.
How Attack Surface Scan covers this
Attack Surface Scan reads the PHP version from the X-Powered-By and
Server headers on hosts under your verified domains, including hosts found through
certificate transparency logs. Where a version is shown, we match it against NVD's affected ranges for
both CVEs. Where the header names a Debian or Ubuntu package build, the distribution's own fix list
decides, so a patched package that keeps the old version number is not flagged. Now that both CVEs
are on CISA's KEV catalog, matching hosts rank first and their severity is raised a step. NVD also lists
PAN-OS as affected, so a GlobalProtect portal under your domain gets a potential
finding to check its version. Most servers hide
the PHP version, and many omit the header entirely. In those cases we cannot tell whether PHP is
running or how old it is, and we do not guess. Hiding the header is still good practice, but it is
not a fix. We do not send exploit traffic. See Vulnerability
matching for the details.
Sources
- Dream: Chained PHP2Shell Exploit Roots 25 Servers
- PHP: Security advisory: Critical remote code execution vulnerabilities, update now (October 21, 2026)
- PHP (GitHub): RCE via OOM corruption, GHSA-w8hw-w9fx-j79w (CVE-2026-109618)
- PHP (GitHub): RCE via stale global state, GHSA-6wmf-4rv5-p3rp (CVE-2026-109619)
- CISA: Critical Vulnerabilities in PHP Require Immediate Patching (updated October 26, 2026)
- CISA: CISA Adds Two Known Exploited Vulnerabilities to Catalog (October 26, 2026)
- PHP: Informational advisory: Session upload progress (October 23, 2026)
- BleepingComputer: PHP2Shell security flaws now sucessfully exploited in the wild
- The Register: CISA confirms PHP2Shell under attack as researchers clock successful exploits
- SecurityWeek: Mirai Botnet Operators Join PHP2Shell Attacks as ASLR Bypass Exploits Emerge
- VulnCheck: PHP2Shell Vulnerabilities: CVE-2026-109618 and CVE-2026-109619
- Wiz: PHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the Internet
- Unit 42: Threat Brief: Critical Vulnerabilities in PHP: CVE-2026-109618, CVE-2026-109619
- AWS: Amazon Threat Intelligence identifies PHP2Shell exploitation prior to public disclosure in MadPot
- SecurityWeek: PHP2Shell Exploitation Started Days Before Patches
- The Hacker News: PHP Issues Emergency Patches for Two Critical PHP2Shell RCE Flaws as Exploit Attempts Emerge
- Help Net Security: PHP2Shell: Critical PHP vulnerabilities patched, update now!
- Cloudflare: Cloudflare deploys protections against php2shell vulnerability
- Datadog Security Labs: PHP2Shell analysis and detection guidance