PHP2Shell: A Major Website Security Scare Happened. Here’s Why We Were Safe.
PHP2Shell was a pair of critical PHP flaws patched on October 21, 2026. What happened, why our Astro sites on Cloudflare weren’t exposed, and what to ask your host.
I first heard about PHP2Shell where a lot of people probably did: Instagram. Two critical flaws in PHP, the language behind a huge share of the web, and patches rushing out.
The sites I build don’t run PHP, so my first instinct was “we’re fine.” But “pretty sure” isn’t an answer I’ll give clients, so I checked. Here’s what happened, what I found, and what to ask your host if your site runs on PHP.
What happened
On October 21, 2026, the PHP project released a security advisory and fixes for two vulnerabilities, CVE-2026-109618 and CVE-2026-109619, reported by researchers at Calif, Wiz and OpenAI. The pair got the nickname “php2shell,” which even CISA’s alert uses.
The PHP Foundation says the CVE numbers leaked on October 20 with a wrong severity score of 10.0. No technical details got out, but PHP moved the release up a day.
The fixed versions are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older no longer get official updates.
Why it was serious
- No login needed. PHP describes “a demonstrated exploit where an unauthenticated request can trigger the attack before any application code runs.” The attack lands before WordPress, your login page or a security plugin gets a say.
- The prize is the server. PHP’s GitHub advisory calls it “unauthenticated remote code execution as the web worker account.” An attacker could run commands with your website’s own access: change pages, plant malware, read what the site can read.
- It’s broad. It covers “all PHP installations serving web requests,” including PHP-FPM, Apache’s mod_php and LiteSpeed.
PHP rates both flaws 9.2 out of 10 on the CVSS 4.0 scale. The US National Vulnerability Database scores them 9.8 on the older CVSS 3.1 scale.
Was it exploited? Cloudflare reported “attack traffic targeting our customers,” and security companies reported exploitation attempts. But CISA “has not observed exploitation of these vulnerabilities as of the time of publication,” and as of October 22 neither flaw is on its list of known exploited vulnerabilities. Attempts aren’t break-ins, and I haven’t seen a confirmed compromise. That can change fast, so patch rather than wait for headlines.
Why our sites weren’t exposed
The sites I build, this one included, are made with Astro and TypeScript and run on Cloudflare Workers. Pages are built ahead of time into plain HTML, and the few live parts, like a contact form, run as small JavaScript programs on Cloudflare’s network. There’s no PHP anywhere in that chain, so PHP2Shell had nothing to attack.
That’s not the same as “can’t be hacked.” Our setup has its own things to keep updated: Astro, the packages it uses, and the Cloudflare configuration. Different stack, different risks. And with no server of my own to patch, I’m trusting Cloudflare to do its part.
For PHP sites, Cloudflare did. It says customers on its free and paid firewall plans “were protected by default” from 3:02 a.m. UTC on October 21, hours before PHP’s release. It’s also clear that a firewall isn’t a fix: “Customers should patch their PHP repos even with WAF protections.”
What I actually checked
On October 22, I had Claude, the AI assistant I use for development, run a read-only audit of everything we have running: this site, the client sites I build and host, demo sites and internal tools. Then I went through the results myself.
- The code. Every project, searched for PHP files, PHP configuration and PHP packages. None.
- Builds and deploys. No pipeline installs PHP. The only container setup, a backup option for one admin tool, is built on Node.js.
- The hosting. Our Cloudflare account holds 18 Workers running our own JavaScript, no Pages projects and no containers. Every domain uses Cloudflare’s nameservers, and 16 common leftover hostnames (old mail, webmail, cPanel or FTP servers) turned up nothing.
- The live sites. All 10 hostnames answered as Cloudflare, with no sign of PHP in the response headers. On the main sites, /wp-login.php returns “not found.”
- Real traffic. From October 17 to 22, about 5,000 requests went looking for .php files across six of our domains, the automated probing every website gets. Not one succeeded. Each got “not found,” “blocked” or a redirect. Separately, Cloudflare’s managed firewall rules blocked roughly 90 to 650 requests per site, mostly attack probes.
- Admin areas. They sit behind Cloudflare Access, so you sign in at Cloudflare before a request reaches the site.
What the audit found, and what it couldn’t
For PHP2Shell, the answer was clear: no PHP in production, nothing to patch. That’s stronger than “no sign of a problem”: we confirmed the thing PHP2Shell needs isn’t there, four different ways.
There were limits, though, and a few surprises:
- Some settings were out of reach. Our access could read traffic data but not the firewall settings, and Cloudflare’s detailed Security Events log isn’t available through its API on the free plan.
- Other companies’ systems are their job. Outside services we use, like email delivery, run on the vendors’ servers. I can’t inspect those, and neither can most businesses.
- The AI made a mistake. It confidently flagged a website as ours that belongs to a different business with a similar name. I caught it because I know my clients. AI made the audit faster and more thorough, but it doesn’t replace knowing your own setup.
- It found unrelated housekeeping. One site was missing standard security headers, which I added the same day, and a few sites were due a routine framework update. Nothing to do with PHP, but I wouldn’t have spotted either without looking.
How to check if your website is affected by PHP2Shell
1. Find out whether your site runs on PHP. WordPress, WooCommerce, Joomla, Drupal and Magento all do, and so do many custom sites. On a hosted builder like Wix, Squarespace or Shopify, server patching is the platform’s job. Not sure? Ask whoever built your site.
2. On WordPress, check your PHP version under Tools → Site Health → Info → Server. 8.2.35, 8.3.36, 8.4.27, 8.5.12 or newer is a fixed release. An older number isn’t automatically bad news: PHP notes that some Linux distributions and vendors provide “backported fixes.” Only your host can confirm.
3. Ask your host. Here’s what I’d send:
- “Has PHP on my server been updated for CVE-2026-109618 and CVE-2026-109619 (PHP2Shell)? On what date?”
- “Which PHP version is my site running now, and does it include the fix?”
- “Was PHP restarted after the update, so the patched version is what’s actually running?”
- “On my plan, who is responsible for updating PHP: you or me?”
- “If my site is on PHP 8.1 or older, what’s the plan to move it to a supported version?”
- “Have you checked my server for signs it was compromised?”
4. If you manage your own server, it’s on you. Update PHP and restart it. PHP’s temporary workarounds “do not make an installation safe,” and CISA’s advice for systems that can’t be updated is blunt: “take PHP-based systems offline until they can be patched or updated.”
Our Website Check looks at public security basics like security headers and form protection, but it can’t see your PHP version or whether you’re patched.
What WordPress owners should know
WordPress isn’t the problem here, and that’s worth saying because it gets blamed for a lot. WordPress.org says “No WordPress update is required or planned for these issues.” The flaws are in PHP, underneath every PHP application.
- Updating WordPress, your theme or plugins doesn’t fix this. Cloudflare: “updating website code or a plugin(s) alone does not fix these vulnerabilities.” Be wary of any plugin claiming to fix PHP2Shell.
- Who patches depends on your hosting. On shared or managed WordPress hosting, the host usually handles PHP. On a VPS, it’s usually you. Ask; don’t assume.
- Old PHP is now a bigger risk. WordPress.org advises anyone on PHP older than 8.2 who runs their own server to consider taking it offline while preparing to upgrade. PHP 8.2 itself reaches end of life on December 31, 2026.
A well-run WordPress site on a host that patched quickly was fine this week. I’d worry about the ones where nobody knows who’s responsible.
Platform, maintenance and setup
I’m not going to tell you to rebuild your website over PHP2Shell. Every kind of website software gets security bugs, including the tools I use. Our setup sidestepped this one because it has fewer moving parts: no server software, no plugin stack, admin areas behind Cloudflare Access. I covered those trade-offs in Wix vs. WordPress vs. Astro.
The real lesson: know what your website runs on, and who keeps each piece updated. If you can’t name who controls your hosting, start with who actually owns your website. That’s also what managed hosting and website maintenance should mean: someone who knows how your site is built and deals with problems as they show up.
What I learned
- Check, don’t assume. I was confident before the audit. Now there’s evidence behind it.
- Go to the source. The first numbers going around, including that 10.0, were wrong.
- “Safe from this” isn’t “safe from everything.” Routine updates are what keep the next scare boring.
Quick answers
Does updating WordPress fix PHP2Shell?
No. The fix is a PHP update on the server, done by your host or whoever manages it.
Which PHP versions fix PHP2Shell?
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, or newer.
Is Cloudflare enough to protect a PHP site?
It helps, but it isn’t a fix. Cloudflare still tells customers to patch, and its rules only filter traffic that goes through Cloudflare.
Do Astro or Cloudflare Workers sites need to do anything?
Not for PHP2Shell, if there’s no PHP anywhere in the setup. Look for an old WordPress blog on a subdomain or a forgotten server still answering.
