Blog
About

Security operationsAnalysis

PHP2Shell takes a server in one request; 2.6 million hosts are exposed

How two PHP flaws let one unauthenticated request run code, why the exposure counts disagree, and what to patch and restart first, 17 to 30 October 2026.

Illustration: The TechBag Journal

If your organisation has a website, a customer portal or a firewall with a web console, it almost certainly runs PHP, whether or not anyone on your payroll writes it. W3Techs puts PHP behind roughly 70% of websites.8 The questions are narrower: what breaks when one request arrives, why switching a feature off does not close it, and how to find every copy of PHP you answer for before someone else does. Node.js, Oracle and Java are in our roundup of the patch week; this piece stays with PHP.

01One worker, many strangers: how a single request takes over

Picture how a PHP site serves traffic. The web server keeps a pool of PHP workers, long-lived processes that each handle request after request, often thousands before they are recycled. For every request a worker does three things. It sets up: reads the headers, cookies and uploaded body into memory and builds the request’s internal state. It runs the application’s script. Then it cleans up, freeing that memory so it is ready for the next stranger. PHP2Shell is two bugs in the first and third steps, so the application’s own login check and input validation never get a say.

In PHP’s words, CVE-2026-109618 is out-of-memory handling that “can interrupt PHP while internal request data is only partially initialized”, after which “request cleanup may then treat the invalid data as valid.” CVE-2026-109619 is request state that “can survive after its backing memory has been freed”, so “a later request handled by the same worker may use that stale state before normal initialization resets it.”1 Engineers call the second a use-after-free.4 Memory is handed back and handed out again while an old pointer still trusts it, and an attacker who decides what gets written there next decides what the worker does with it.

The attack lives in the worker's setup and cleanup, before and after the application, so the application cannot stop it

The life of one PHP worker and where the two October 2026 flaws sit in it

Step 1 of 5

1. A worker serves strangers in turn

PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed all keep workers that handle request after request. All five are in scope.

Source: PHP security advisory, 21 October 2026; Qualys TRU; BleepingComputer on the first confirmed exploitation · as of 26 October 2026

PHP rates the risk highest under Apache mod_php, “with a demonstrated exploit where an unauthenticated request can trigger the attack before any application code runs.”1 The first confirmed compromise in the wild matched that profile exactly: a honeypot running Apache with mod_php on PHP 8.4.26, with a single worker.8 PHP has not published why mod_php is worse than PHP-FPM, and we will not guess at the internals. What matters is that a mod_php server needs nothing from the application to be taken.

02The race: probed four days early, listed by CISA in five

The disclosure did not go to plan. On 17 October Amazon’s MadPot honeypot logged an attempt from 103.216.220[.]92, an address Amazon tied to “a commercial anonymization network”. A spokesperson said there was “no evidence” the probe was benign.5 On 20 October PHP pre-announced a release for 21 October at 14:00 UTC, reserving the right to go earlier “should details of either vulnerability become public”.1 The Hacker News reports that the coordinated date had been 22 October and was brought forward a day, and that the CVE identifiers and proof-of-concept code leaked ahead of time.5

Release day ran ahead of the release. Amazon saw its first attempt at about 02:00 UTC. ELLIO logged its first PHP2Shell request at 08:36 UTC, less than an hour after Chainguard published container images with the fix. ELLIO says Chainguard “unilaterally broke the embargo”; the PHP Foundation says Chainguard had received the patch in advance “so its users could update the moment the vulnerabilities were disclosed.”5 Cloudflare’s CTO said it was seeing attacks on both flaws before the patches shipped.7 The web host Pantheon had blocked more than 60,000 suspicious requests by that evening.5

Attackers were probing four days before the fix and scanning hours before the release

PHP2Shell disclosure and exploitation events, 17 to 29 October 2026 (UTC)

17 Oct 2026Amazon honeypot probed
20 Oct 2026PHP pre-announces fix
21 Oct 2026First release-day attempt
21 Oct 2026Scans after Chainguard images
21 Oct 2026PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35
24 Oct 2026First confirmed takeover
26 Oct 2026CISA adds both to KEV
29 Oct 2026US federal deadline
Table view
DateEventDetail
17 Oct 2026Amazon honeypot probedFrom an anonymiser in Australia, four days before disclosure
20 Oct 2026PHP pre-announces fixRelease set for 21 October, 14:00 UTC; earlier if details leak
21 Oct 2026First release-day attemptAmazon, about 02:00 UTC
21 Oct 2026Scans after Chainguard imagesELLIO's first request, under an hour after patched images appeared
21 Oct 2026PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35Scheduled release; no complete mitigation without it
24 Oct 2026First confirmed takeoverHoneypot running mod_php on 8.4.26; same day, operators shortlist 216 hosts
26 Oct 2026CISA adds both to KEVKnown exploited; forensic triage required
29 Oct 2026US federal deadlineKEV due date, three days after listing

Source: The Hacker News; PHP security announcements; BleepingComputer; Security Affairs on Cyfirma; CISA KEV catalogue · as of 29 October 2026 · The leak of the CVE identifiers and proof-of-concept is reported without a date, so it is not plotted

03Why nobody can count the exposure, and the one thing every count agrees on

Four public counts appeared within a week, and the largest is 64 times the smallest. VulnCheck found 2,608,039 internet-facing PHP hosts and judged 2,607,985 of them, 99.998%, vulnerable or likely vulnerable.9 Modat counted 4.38 million internet-facing PHP services on 20 October.5 VirusTotal put exposed PHP hosts at over 5.1 million.7 Qualys found 167 million PHP package installs across more than 10,000 customers, 73% of them on internet-facing assets, and only 199,000 patched in the first 12 hours.4

They are not contradicting each other. A host is one internet address that answers a web request. A service is an address and a port, so a server answering on two ports counts twice. An install is a PHP package an agent found on a scanned machine, including internal servers, containers and machines carrying two PHP versions. And a version banner is not a vulnerability: VulnCheck counts the 1,133,000 hosts that show no version as likely vulnerable, and notes that Linux distributions backport fixes without changing the version string.9 The scanners overstate on a patched Debian box and understate wherever the banner is hidden.

Three counts, three units, one answer: about three in four PHP deployments that show a version are past end of life

Per cent of each count by PHP branch status, as published 20 to 29 October 2026

  • End-of-life branch (8.1 or older)
  • Supported branch (8.2 to 8.5)
  • Version hidden or not reported
VulnCheck: 2.61M internet hosts42%15%43%
Modat: 4.38M internet services79%21%
Qualys: 167M installs66%26%
Table view
End-of-life branch (8.1 or older)Supported branch (8.2 to 8.5)Version hidden or not reported
VulnCheck: 2.61M internet hosts421543
Modat: 4.38M internet services79021
Qualys: 167M installs66268

Source: VulnCheck (internet hosts, 21 Oct); Modat via The Hacker News (internet services, 20 Oct); Qualys TRU (installs in its customer base, updated 29 Oct) · as of 29 October 2026 · Shares as each vendor published them, rounded to whole per cent. VulnCheck: about 42% end-of-life, 403,000 hosts (15%) supported, 43% showing no version. Modat published only the end-of-life share. Qualys: 110 million end-of-life and 44 million supported installs leave 13 million of its 167 million without a stated branch, which it does not reconcile.

That is the real problem. The PHP project fixed 8.2 to 8.5. For 7.4, 8.0 and 8.1 it published “minimal source-backports” for people who build PHP themselves; there is no release to install.1 PHP 7.3 and older, PHP 5 included, get no fix at all.3 VulnCheck counts more than 700,000 internet hosts on PHP 3.x to 7.3.9 For those, the patch was never coming.

04The PHP you did not know you were running

Most organisations do not run PHP; they run something built on it. VulnCheck could identify the application on part of the exposed estate, and calls every figure a floor.9 WordPress alone is more than all the others combined.

WordPress sits on nearly half a million exposed PHP hosts, more than every other named application combined

Internet-facing PHP hosts by application identified, 21 October 2026

WordPress4,69,699 hosts
Laravel (incl. Livewire)1,24,866 hosts
Joomla26,591 hosts
Drupal24,116 hosts
Magento / Adobe Commerce3,735 hosts
MediaWiki2,116 hosts
Symfony2,104 hosts
phpBB1,391 hosts
WHMCS59 hosts
Table view
Value (hosts)
WordPress4,69,699
Laravel (incl. Livewire)1,24,866
Joomla26,591
Drupal24,116
Magento / Adobe Commerce3,735
MediaWiki2,116
Symfony2,104
phpBB1,391
WHMCS59

Source: VulnCheck, PHP2Shell exposure analysis · as of 21 October 2026 · Floors: only hosts where the application could be identified. Hosts are counted once, at their latest scan.

The harder inventory is the PHP inside things you bought. Palo Alto Networks lists PAN-OS and Panorama 10.2, 11.1, 11.2, 12.1 and 12.2 as affected through the management web interface, both the HTTPS console and the XML API; GlobalProtect is not. Its first hotfixes were 10.2.18-h13, 11.1.16-h4 and 11.2.10-h16, with 17 more due between 27 and 30 October. Cisco lists Ultra-Reliable Wireless Backhaul, Expressway and Duo Access Gateway (fixed in 3.2.0) as affected, with 11 products and services under investigation. Fortinet’s FG-IR-26-186 has four products under investigation (FortiDDoS, FortiClient Cloud Services, FortiSOAR and FortiSOAR PaaS) and 43 not affected, FortiOS and FortiWeb among them.12

05What to do, in order

PHP’s release notes put it in one line: “There are no complete mitigations, updating is the only safe choice.”2 Everything below follows from that.

4

Fixed releases: 8.5.12, 8.4.27, 8.3.36, 8.2.35

PHP, 21 Oct 2026

0

Settings that make an unpatched server safe

PHP advisory

3 days

From KEV listing to the US federal deadline

CISA KEV

  1. Find every PHP. Start with what faces the internet: websites, portals and shared-hosting accounts, then appliance management consoles, then container images and their base layers, then anything a vendor hosts for you. Read the version from the package manager, not the banner, because distribution backports keep the old version string.9
  2. Patch, then restart every worker. Move to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or your distribution’s fixed package, and restart every PHP-FPM pool, Apache running mod_php, LiteSpeed and FrankenPHP process. A fixed binary on disk does nothing for a worker still running the old code in memory.3 Rebuild and redeploy images rather than patching running containers.
  3. Decide about end-of-life PHP this week. On 7.4, 8.0 or 8.1: take a backported package from your distribution or an extended-support vendor, build PHP’s minimal source backport, or upgrade. On 7.3 or older there is no fix; upgrade or take it off the internet. While you decide, PHP’s interim settings (session upload progress off in php.ini, a low post_max_size, a container memory limit, then a restart) “reduce exposure to specific attack paths but do not make an installation safe.”1 A web application firewall rule is a bridge too; Cloudflare described its own as temporary.7
  4. Assume you were probed, and look. Anything internet-facing and unpatched after 21 October deserves the forensic triage CISA asks of federal agencies.11 Look for new PHP files in web roots, since one recorded attempt tried to plant a web shell through PHP’s session upload-progress feature.9 Look for workers crashing on out-of-memory errors, and for outbound connections from web servers. Rotate session secrets and API keys held by affected applications, because the confirmed exploit read cookie data out of worker memory.8

Sources

  1. PHP, security release pre-announcement (20 Oct) and advisory for CVE-2026-109618 and CVE-2026-109619 (21 Oct) — 20 and 21 October 2026
  2. php-src, release php-8.4.27 — 21 October 2026
  3. watchTowr, PHP CVE-2026-109618 FAQ: fixed versions, end-of-life table, worker restarts — 20 October 2026, updated 26 October
  4. Qualys Threat Research Unit, PHP announces critical security release: CVSS vectors, 167 million installs — 20 October 2026, updated 29 October
  5. The Hacker News, Someone tried to exploit PHP2Shell four days before disclosure (Amazon, ELLIO, Chainguard, Pantheon, Modat) — 22 October 2026
  6. SecurityWeek, PHP2Shell: mass exploitation looms for leaked critical PHP flaws — 21 October 2026, updated 22 October
  7. BleepingComputer, PHP ships emergency patches for critical PHP2Shell flaws (Cloudflare, VirusTotal) — 21 October 2026
  8. BleepingComputer, PHP2Shell security flaws now successfully exploited in the wild (honeypot confirmation; W3Techs share) — 26 October 2026
  9. VulnCheck, PHP2Shell vulnerabilities: exposure, versions, applications, canary activity — 21 October 2026
  10. CISA, CISA adds two known exploited vulnerabilities to catalog — 26 October 2026
  11. CISA, Known Exploited Vulnerabilities catalogue feed, entries for CVE-2026-109618 and CVE-2026-109619 (due date, forensic triage) — catalogue version 2026.10.29
  12. Help Net Security, PHP2Shell: Fortinet, Cisco and Palo Alto Networks products affected — 22 October 2026, updated 26 October
  13. Security Affairs, PHP2Shell: suspected North Korean campaign targets 216 vulnerable PHP hosts (Cyfirma) — 26 October 2026
  14. CERT-In, CICA-2026-3650: Critical remote code execution vulnerabilities in PHP — 22 October 2026
  15. CERT-In, Directions under section 70B(6) of the IT Act (six-hour reporting) — 28 April 2022

Related on TechBag: the vulnerability management guide covers the scanners that find every PHP install, including the agent-based kind behind the Qualys count; the RMM and patch guide covers the tools that push fixes and restarts at scale; the Palo Alto Networks hub tracks the PAN-OS line whose console is affected.

Disclosure. TechBag is a software reseller: it earns a margin when a reader buys through it, including from vendors named here. The analysis is TechBag’s own; no vendor paid for or saw this piece before publication. Facts are labelled reported, TechBag count or our view.