Critical Exploited in the wild Vulnerabilities · 21 October 2026 · Updated 26 October 2026 · 6 min read

PHP2Shell: two critical PHP flaws are being exploited. Patch now.

Two remote code execution flaws in the PHP engine itself are under attack. Because the bugs sit in PHP rather than in WordPress, Drupal or any single application, almost every website running PHP needs attention, including sites your hosting provider or MSP runs for you.

By PulseDefend Threat Intelligence
Laptop on a desk showing a security score dashboard

What happened

Wiz Research found the first flaw in August 2026 and reported both privately to the PHP project. A coordinated release was planned for 22 October, but details leaked on 20 and 21 October. PHP shipped emergency fixes on 21 October, and the same day Patchstack’s hosting partners and watchTowr’s honeypot network reported exploitation attempts. On 26 October, CISA added CVE-2026-109618 to its Known Exploited Vulnerabilities catalogue.

  1. 19 AugWiz Research discovers the first flaw
  2. 24 AugBoth flaws reported privately to PHP
  3. 20–21 OctDetails leak ahead of planned disclosure
  4. 21 OctEmergency fixes released; exploitation observed
  5. 26 OctCVE-2026-109618 added to CISA KEV

How the flaws work

CVE-2026-109618. If PHP runs out of memory part-way through setting up a request, it can leave half-built internal data that its clean-up code then trusts. A crafted request can turn that into code execution.

CVE-2026-109619. Internal state can outlive the memory it points to, so the next request handled by the same PHP worker acts on leftover data. Exploitation needs two requests to the same worker.

Neither needs a login. Researchers also showed that an unauthenticated attacker can read PHP worker memory, which may contain passwords, session tokens and API keys.

Who is affected

PHP branchVulnerableFixed in
8.5Before 8.5.128.5.12
8.4Before 8.4.278.4.27
8.3Before 8.3.368.3.36
8.2Before 8.2.358.2.35
7.4, 8.0, 8.1All versionsNo official release: vendor packages or PHP source backports
7.3 and olderAll versionsNo fix: upgrade

Every web-facing way of running PHP is in scope: Apache mod_php, PHP-FPM, php-cgi, LiteSpeed and FrankenPHP. Risk is highest on Apache mod_php, where an attack can succeed before your application’s code even runs.

The exposure is enormous. Modat counted about 4.38 million PHP services on the internet, and most hosts that reveal their version run end-of-life branches. PHP 7.4 alone accounted for about 878,000.

Check the runtime, not the label. Linux distributions often backport fixes without changing the upstream version number, so check your distribution’s advisory. Confirm the PHP that actually serves web requests, including containers and PHP bundled inside appliances, not just what php -v reports.

What to do now

  1. Find every PHP runtime: servers, containers, appliances and PHP bundled in third-party apps. For sites a hosting provider or MSP manages, ask for written confirmation that they are patched.
  2. Patch to 8.2.35, 8.3.36, 8.4.27 or 8.5.12. Start with internet-facing servers, especially Apache mod_php.
  3. Restart or redeploy all PHP workers. A patched binary does nothing while old workers are still running.
  4. Move off end-of-life branches (7.4, 8.0, 8.1). Vendor backports buy time; they are not a plan.
  5. Look back from 20 October for unusual requests, PHP process crashes and unexpected command execution. If you find signs of compromise, start incident response and rotate every credential the server could reach.

If you can’t patch today

PHP is clear that no configuration change fully fixes these flaws. These steps reduce exposure while you schedule the update:

  • Restrict internet access or isolate the service. Put a WAF in front and block direct access to the origin server.
  • Set session.upload_progress.enabled=0 in php.ini or the FPM pool, then restart all workers. Setting it with ini_set() or .user.ini is not enough.
  • On PHP 8.5, set fatal_error_backtraces=0.
  • Enforce request-size and multipart limits at the proxy, and block multipart requests if the application doesn’t accept uploads.

Find it with Microsoft Defender

If your servers are onboarded to Defender for Endpoint with Defender Vulnerability Management, this Advanced Hunting query lists devices exposed to either CVE:

KQL · Defender Advanced Hunting
DeviceTvmSoftwareVulnerabilities
| where CveId in ("CVE-2026-109618", "CVE-2026-109619")
| summarize CVEs = make_set(CveId)
    by DeviceName, OSPlatform, SoftwareName, SoftwareVersion
| order by DeviceName asc

Coverage depends on Defender recognising the PHP install. PHP inside containers or bundled with other software may not appear, so treat an empty result as a starting point, not an all-clear.

Not sure where PHP is running? Our threat & vulnerability monitoring finds exposed PHP across your estate, and our incident response team can investigate if you think you’ve been hit.
Talk to us

Sources