On October 21, 2026, the PHP security team shipped an emergency release — PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 — fixing two critical, unauthenticated remote code execution (RCE) vulnerabilities that sit in the PHP core itself rather than in any specific application. The flaws are collectively being called php2shell and are tracked as CVE-2026-109618 and CVE-2026-109619, each rated CVSS v4.0 9.2 (Critical).

This is one of the most significant PHP events in recent memory, because the bug is in the language runtime that powers an estimated 70–80% of the web.

What breaks

Both vulnerabilities stem from the same underlying weakness: how PHP handles memory when a request ends abnormally (specifically fatal and out-of-memory errors). In these failure paths, PHP can leave its internal state corrupted, and a later request handled by the same worker can reuse that stale state.

  • CVE-2026-109618 — during out-of-memory handling, PHP can be interrupted while internal request data is only partially initialized. Request cleanup then treats the incomplete data as valid, leading to a use-after-free in the upload-progress unserializer path. This enables unauthenticated remote process-memory disclosure and, with a crafted chain, RCE.
  • CVE-2026-109619 — a fatal error can leave global memory pointing to regions that have already been freed. A subsequent request can read or branch on that stale state (a heap use-after-free), again reaching unauthenticated RCE.

Because the flaw lives in the runtime, updating your website code or a plugin does not fix it — the PHP software underneath must be updated.

Why this matters

Researchers (Wiz Research, together with Calif.io, OpenAI and Quarkslab) demonstrated pre-authentication RCE against the latest WordPress, Drupal and Joomla container images. They also showed that an attacker can read sensitive data straight from the PHP process's memory — passwords, tokens, API keys — without needing full code execution.

Wiz notes the underlying bugs had existed for decades, but building a reliable exploit was "at the edge of what human researchers could practically achieve." Frontier AI models substantially lowered that barrier and helped both find the vulnerabilities and develop the exploit.

The exposed surface is large. VirusTotal estimates over 5.1 million PHP hosts are exposed online, with roughly 3.8 million having at least one port open; Palo Alto Networks' Cortex Xpanse telemetry points to 22.6+ million exposed instances. Cloudflare's CTO Dane Knecht confirmed the company was "seeing early attacks emerging" and said the WAF protections it deployed are a stopgap only — patching is the fix. The UK's NCSC is also urging organizations to update (or take PHP systems offline) immediately.

Scope

  • Affected: all PHP versions from 5.4 through 8.5.11.
  • Patched in: PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35 (released October 21, 2026 at 14:00 UTC).
  • Every web-serving install is in scope: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The PHP team rates mod_php as the highest risk, with a demonstrated exploit that can fire before any application code runs.
  • PHP 8.1 and older have reached end of life in the PHP project and don't receive an official fix. Some distributions and LTS vendors provide backports, and the PHP team published minimal source-backports for 7.4, 8.0 and 8.1 for people building from source.

What to do

  1. Update PHP now to a patched release on your branch, and redeploy affected workloads (containers, PaaS runtimes, appliances). If your host/provider manages PHP, ask them to apply the update.
  2. On EOL versions (8.1 and older), confirm with your distribution/LTS vendor whether a backported fix is available, and plan the upgrade.
  3. Temporary mitigation (patch is still the only permanent fix): - Set session.upload_progress.enabled = 0 and restart every worker. - Set memory_limit = -1 in a way applications can't override (e.g. php_admin_value in the FPM pool or Apache config). - Use a container or cgroup memory limit as an availability boundary.
  4. If you sit behind Cloudflare, keep the deployed WAF rules on while you patch — they only block known vectors.
  5. Watch for unverified PoCs: code "exploiting" php2shell is circulating; some is laced with malware, so test in a lab before running it against anything sensitive.

Bottom line: this is a core-runtime, pre-auth RCE in the engine that runs most of the web's CMS-driven stack. Treat any exposed, unpatched PHP host as high priority.

Sources: - PHP security advisory (php.net) - Wiz Research — php2shell - BleepingComputer — PHP ships emergency patches for critical PHP2Shell flaws - Cloudflare — WAF protection against the PHP vulnerabilities - CERT-EU — Security Advisory 2026-018 - Unit 42 — Threat Brief for CVE-2026-109618 / CVE-2026-109619 - Tenable — php2shell FAQ