On October 21, 2026, PHP released patches for two critical remote code execution vulnerabilities in its core runtime — collectively named PHP2Shell. Within hours of the patches being published, Cloudflare confirmed active exploitation had already begun. Attackers had analysed the patches, reverse-engineered the flaws, and built working exploits on the same day the fix was available.

Both vulnerabilities require no authentication. They affect every common PHP deployment environment. And for businesses running PHP 8.1 or earlier — which is a significant portion of the web — there is no patch available at all.

What PHP2Shell Is

PHP2Shell is the name given to two distinct but related vulnerabilities in PHP's core request-handling runtime:

CVE-2026-109618 — Out-of-memory corruption (CVSS 9.2)

When PHP encounters an out-of-memory error while setting up request data, that data is left in a partially initialized state. The cleanup process then treats this invalid data as legitimate, creating an execution path that an attacker can trigger and direct. No login, no session, no prior access required — a crafted HTTP request to any PHP endpoint is enough.

CVE-2026-109619 — Stale global state (CVSS 9.2)

PHP keeps internal request-owned state alive after the memory behind it has been freed. When the same worker process handles a subsequent request, it can access and act on that stale state before PHP's normal initialization resets it. In a shared hosting environment or any application using persistent worker processes — which covers most production PHP deployments — this creates a cross-request code execution primitive.

Both vulnerabilities score 9.2 on CVSSv4 and require zero authentication. Combined, they represent the most significant PHP core security event in years.

Who Is Affected

Unlike previous PHP vulnerabilities limited to specific configurations, PHP2Shell affects all major deployment environments: Apache with mod_php, PHP-FPM (the most common production setup), php-cgi, FrankenPHP, and LiteSpeed. If your server handles web requests using PHP — in any standard configuration — you are in scope.

Patched versions are available for PHP 8.2 (8.2.35+), 8.3 (8.3.36+), 8.4 (8.4.27+), and 8.5 (8.5.12+). PHP 8.1 and all earlier versions receive no patch. PHP 8.1 reached end-of-life in December 2025, meaning any server still running it has no supported remediation path — upgrade is the only option.

PHP powers approximately 77% of all websites with a known server-side language. WordPress, WooCommerce, Drupal, Joomla, Magento, and most custom web platforms built in the last decade all run on PHP. If your business has a website, a customer portal, a booking system, or an e-commerce store, there is a high probability that PHP is in your stack — whether you know it or not.

The Deeper Problem: Software You Don't Know You're Running

PHP2Shell is a critical vulnerability. But it also illustrates a problem that exists independently of any specific CVE: most SMBs have no accurate inventory of the software versions they're actually running.

The developer who built the site three years ago is gone. The hosting provider applies infrastructure patches but not application-level updates. The PHP version that was current when the site launched hasn't been touched since. Nobody owns the question: "what are we running, and is it patched?"

This is what makes third-party software risk so persistently dangerous. Your attack surface isn't just your code — it's everything you use, host, or have connected to your infrastructure. Every plugin on your CMS, every vendor with API access to your systems, every integration built for a project that ended two years ago but whose credentials were never revoked. All of it carries vulnerabilities on its own maintenance schedule, independent of anything your team controls.

Exploitation of PHP2Shell started on the same day the patch was released. That's not an edge case — it's increasingly the norm for high-severity vulnerabilities. The window between disclosure and active exploitation has collapsed from weeks to hours. Businesses that patch on a quarterly maintenance cycle are, by definition, exposed for months after a critical flaw becomes public knowledge.

What to Do

Check your PHP version — now

If you don't know what PHP version your site or application runs on, find out today. Your hosting control panel, your developer, or a simple phpinfo() call will tell you. If you're on 8.1 or earlier, you need to upgrade — there is no patch path. If you're on 8.2, 8.3, 8.4, or 8.5, verify that you're running the patched versions listed above.

Apply temporary mitigations if you can't patch immediately

While upgrading is the only real fix, temporary measures can reduce exposure: enforce memory limits, restrict maximum request sizes, disable session.upload_progress.enabled, and implement multipart request blocking at the WAF or reverse proxy layer before requests reach PHP.

Audit your full PHP stack

PHP version is one layer. Also check: CMS version, every installed plugin and its last update date, any abandoned or nulled plugins, and the PHP configuration for any vendor-managed portals or integrations connected to your environment. Each of these is an independent attack surface.

Establish a patch cadence that matches the threat

Critical CVEs with CVSS scores above 9.0 — like PHP2Shell — are being exploited within hours of disclosure. A managed security service continuously monitors vulnerability disclosures against your specific stack and flags when a critical patch applies to software you're actually running. A one-time security assessment establishes the baseline: what you're running, what's exposed, and what the remediation priority order should be.

PHP2Shell is actively being exploited right now. If your business runs PHP — and statistically, it almost certainly does — the question isn't whether this applies to you. The question is whether your PHP version is patched, and whether you have a process that would have caught this within hours rather than months. Most SMBs don't. That gap is exactly what attackers are counting on.