PHP2Shell: is your WordPress site at risk, and what should you do?

PHP2Shell lets attackers run code on servers with unpatched PHP, WordPress sites included. How to check yours, what to do now and why static sites dodge it.

Mike ArnoldPublished 12 min read

Short answer

PHP2Shell is the nickname for two critical flaws in PHP itself (CVE-2026-109618 and CVE-2026-109619), patched on 21 October 2026. They can let an attacker run code on a server without logging in, and every WordPress site runs on PHP. The fix is updating PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, so ask your host today. A static Astro site has no PHP on the server, so it isn't exposed.

On 21 October 2026, the PHP team published an advisory headed “update now”. It fixed two critical flaws that can let someone take over a web server without a password. The flaws were nicknamed PHP2Shell. The UK’s National Cyber Security Centre told organisations to patch straight away or take affected systems offline, and that day several council websites and the Met Police site went offline.

PHP is the programming language WordPress is built on. It runs on your web host’s server every time someone opens one of your pages. It also powers 69.2% of the websites whose server language W3Techs can identify, and every WordPress site is one of them. If you run a WordPress site, this is your problem until your host says otherwise.

Here’s what PHP2Shell is, how to check your site in five minutes, what to do today, and why I build sites that don’t run PHP at all.

What is PHP2Shell?

PHP2Shell is the nickname for two critical security holes in PHP, the language WordPress runs on, officially CVE-2026-109618 and CVE-2026-109619. They were fixed on 21 October 2026. Both can let an attacker take control of a web server without a password.

In plain terms, when a page request goes wrong part-way through (by running out of memory, for example), PHP can leave scraps of it behind. A carefully crafted follow-up request can reuse those scraps to run the attacker’s own code on the server. From there they can change your site, steal data or use the server for something else. Security people call this remote code execution, and it’s about as serious as website bugs get.

Three things make this one worse than the usual security notice:

  • It doesn’t need a weak website. Wiz, one of the security firms that found the flaws, says even a “Hello World” app on an affected PHP version can be vulnerable. Your WordPress install, theme and plugins can all be fully up to date and the server still exposed.
  • It goes back years. Wiz says every PHP version released in the last decade is affected by at least one of the two bugs.
  • The details got out early. Patchstack reports details leaked on 20 October, the day before the fix, and BleepingComputer reports that Cloudflare, which protects a large share of the web, was already seeing early attacks before the fix was out.

The PHP team says every common way of running PHP on a server is affected. It rates one older setup, Apache with mod_php, as the most at risk, because an attack can work “before any application code runs”. You don’t need to know which setup you’re on. Your host does.

Is my WordPress site affected by PHP2Shell?

Your WordPress site is affected if its server runs a version of PHP older than 8.5.12, 8.4.27, 8.3.36 or 8.2.35, unless your host has patched it another way. You can see your PHP version in WordPress under Tools, Site Health, Info, Server.

Which PHP version you’re on matters as much as whether you’ve updated:

PHP version Status after PHP2Shell
8.5, 8.4, 8.3 Fixed in 8.5.12, 8.4.27 and 8.3.36
8.2 Fixed in 8.2.35, but security support ends on 31 December 2026
8.1, 8.0, 7.4 and older No longer updated by the PHP project. Only fixed if your host has added the patch to these older versions itself

That last row covers a lot of WordPress sites. WordPress.org’s own PHP version statistics, checked on 27 October 2026, show 33.6% of WordPress sites running PHP 8.1 or older, and 15.1% still on PHP 7.4. Another 23.2% are on PHP 8.2, which has two months of security fixes left.

What should I do about PHP2Shell right now?

Check your PHP version, then ask your host to confirm in writing that your server has the PHP2Shell patch. If you’re on PHP 8.1 or older, ask to move to a supported version. If you manage your own server, update PHP and restart it today.

PHP2Shell checklist for WordPress site owners

0/ 6

If your host can’t install the update straight away, there are temporary settings it can change in the meantime. The PHP team is clear they’re a stopgap: they “reduce exposure to specific attack paths but do not make an installation safe”. Only the update fixes it.

Has PHP2Shell been exploited?

Attackers moved fast. Cloudflare saw early attacks before the fix was out, and hosting companies reported attacks to Patchstack on 21 October. Confirmed break-ins were still thin a few days later: by 24 October, security firm Rapid7 hadn’t confirmed any successful attacks, though it had reports of attempts.

The picture changed by the hour that week, so here’s where it stood when I wrote this:

  • 21 October: PHP released the fixes. Patchstack’s live timeline logged reports of active exploitation from hosting partners, while its own data showed only probing so far.
  • 22 October: Rapid7 reported that working attack code had been published online, though each version only worked on a particular mix of server and PHP version.
  • 23 October: PHP warned of a separate flaw, CVE-2026-115560. It only affects sites set up in an unusual way, and the same temporary setting hosts used for PHP2Shell blocks it until the next PHP release.
  • 25 October: Palo Alto Networks’ Unit 42 withdrew an earlier report linking an attack on a European government agency to PHP2Shell, saying it couldn’t confirm the link.

Once attack code is public, anyone can scan the web for servers that haven’t been updated. If your host hasn’t confirmed the patch yet, treat that as urgent.

Why do WordPress sites keep ending up in security warnings?

Because a WordPress site runs a lot of code on every page view. PHP, WordPress core, a theme and a stack of plugins all run on the server each time someone visits, and each layer needs patching. Most of the risk sits in plugins.

PHP2Shell is unusual because the hole was in PHP itself. Most WordPress problems come from the layers on top. Patchstack’s State of WordPress Security 2026 counted 11,334 new vulnerabilities in the WordPress ecosystem in 2025. 91% were in plugins and just 6 were in WordPress core. 46% had no fix available when they were made public.

That’s not a sign WordPress is badly made. It’s what happens when anyone can write a plugin. Every plugin you install is more code running on your server, and someone has to keep every one of them updated, along with the PHP version underneath.

Has WordPress got slower and more bloated?

WordPress pages have got heavier. HTTP Archive data shows the typical WordPress page on mobile grew from 2.17MB in January 2023 to 2.72MB in September 2026, and its JavaScript from 464KB in 2021 to 677KB. Speed scores have improved over the same years, but WordPress still trails sites built with Astro.

To be fair to WordPress, its real-world speed has improved. In January 2020 only 14% of WordPress sites passed Google’s Core Web Vitals, the speed checks Google runs on real visits, on mobile. By September 2026 it was 48%. But the pages themselves kept growing, and the gap with lighter tools is still wide.

Figure

WordPress pages are twice the weight of Astro pages, and pass Google's speed checks less often

WordPressMedian mobile page weight2.72MB
AstroMedian mobile page weight1.36MB
WordPressPass all Core Web Vitals48%
AstroPass all Core Web Vitals71%
HTTP Archive Tech Report, WordPress and Astro, all countries, mobile, September 2026: 2,658,175 WordPress and 47,277 Astro sites with Core Web Vitals data. Page weight is the median for each technology. HTTP Archive notes that a technology linked with good or poor performance isn't necessarily the cause.

The numbers aren’t a pure like-for-like. Astro is a much newer tool, and WordPress runs everything from one-page sites to huge shops. Still, the typical Astro page weighs half as much and passes Google’s checks far more often. For a small business site, that’s the comparison that matters.

Would an Astro site have been affected by PHP2Shell?

A static Astro site wouldn’t. Astro builds every page into a plain HTML file before anyone visits, so the live server just hands out finished files. There’s no PHP, no database and no admin login on it for PHP2Shell, or a plugin bug, to reach.

The difference is in what happens when someone opens a page:

Figure

What runs on the server when someone opens a page

WordPress

  1. 01Visitor asks for a page
  2. 02Web server receives it
  3. 03PHP runsWhere PHP2Shell struck
  4. 04WordPress, theme and plugins run
  5. 05Database is queried
  6. 06Page is built and sent

Static Astro site

  1. 01Visitor asks for a page
  2. 02Hosting network receives it
  3. 03Ready-made HTML file is sentNo code runs per visit
How a typical WordPress host and a static Astro site serve a page. Astro sites can also run server code if they're built that way; this shows the static setup I use.

It’s not magic and I won’t pretend it is. An Astro site can run server code if it’s built that way, and then it needs its software kept up to date like anything else. The site’s build tools still need updating too, and a contact form still sends data somewhere. But “a server that runs code for every visitor” and “a server that hands out files” are very different targets, and only one of them was in the firing line last week.

Should I move my WordPress site to Astro?

Moving makes sense if your site is mainly pages and a blog, you’re tired of plugin updates, and speed matters to you. Patching PHP comes first either way, because a rebuild takes weeks and PHP2Shell needs fixing today. Stay on WordPress if you rely on WooCommerce or plugins that have no simple replacement.

A move to Astro suits you if:

  • Your site is mostly pages and a blog. That’s most small business sites: services, about, contact, some posts.
  • Nobody really looks after it. No updates, no checks, an old PHP version you didn’t know about until today.
  • Speed matters to you. When I rebuilt a slow, plugin-heavy WordPress site for a vehicle customisation studio in Astro, its clicks from Google rose 26% a day.

Stay on WordPress, at least for now, if your site is a large WooCommerce shop, runs memberships or bookings through plugins, or has a team posting to it every day who don’t want to learn anything new. You can still make WordPress safer by cutting plugins, getting onto a supported PHP version and having someone check it every month.

Moving platform means rebuilding the pages and redirecting every old URL, so it’s worth doing properly. My guide to redesigning a website without losing SEO covers the steps, and what a new website costs in the UK covers the budget.

Common questions

What is PHP2Shell?

PHP2Shell is the nickname for two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619, disclosed on 21 October 2026. Both are bugs in how PHP tidies up after a page request goes wrong, and both can let an attacker take control of the server without a password. They're rated 9.2 out of 10 for severity.

Which PHP versions fix PHP2Shell?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, all released on 21 October 2026. PHP 8.1 and older no longer get updates from the PHP project, though some hosts have added the fix to older versions themselves. If your site is on 8.1 or older, the safest move is upgrading to a supported version.

Does PHP2Shell affect WordPress?

Yes, if the server runs an unpatched version of PHP. The flaws are in PHP itself, not in WordPress, so a fully updated WordPress install is still exposed on an unpatched server. Researchers at Wiz showed it working against the latest WordPress, Drupal and Joomla images.

Do I need to update WordPress to fix PHP2Shell?

No. Updating WordPress, your theme or your plugins doesn't fix PHP2Shell, because the bug is in PHP on the server. The fix is a PHP update, which on most hosting is done by the host. Keep WordPress updated anyway, because plugins are where most WordPress security problems come from.

Is an Astro site more secure than WordPress?

A static Astro site has a much smaller attack surface. It's built into plain HTML files before anyone visits, so there's no PHP, database or admin login on the live server for an attacker to reach. Nothing on the web is risk-free, and an Astro site that runs server code still needs its dependencies kept up to date.

Want to hand your site over to a professional?

Everything above is yours to run with. If you'd rather someone else ran it, send me the address and I'll tell you what I'd fix first — free, and in plain English.

Get a free SEO audit