Writing · Web security

PHP2Shell: if your site runs PHP 8.1 or older, no official release is coming.

PHP2Shell lets an attacker take over a web server without logging in. The releases PHP shipped on 21 October cover only PHP 8.2 and newer. Here is how to tell whether you are exposed, and what to do this week.

· 7 min read · Rakesh Maisuria

The short version

  • Two critical flaws in PHP itself let attackers run code on your web server with no login.
  • Updating WordPress or plugins does not fix them. Updating PHP does.
  • Fixed releases: 8.2.35, 8.3.36, 8.4.27, 8.5.12. For 8.1 and older, source patches only; for 7.3 and older, nothing.
  • Attacks started before many sites could update. Check your exposure in four questions.

What happened

On 20 October the PHP project warned that an emergency security release was coming for flaws in PHP itself. Details leaked online before the fixes were ready. On 21 October PHP shipped them in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35. The flaws are tracked as CVE-2026-109618 and CVE-2026-109619, rated 9.2 out of 10, and have become known as PHP2Shell.

Attacks did not wait for the patch. Cloudflare reported attack traffic against its customers and attackers reworking their payloads to slip past its filters. Security firm watchTowr saw exploitation in the wild, and CERT-EU noted proofs of concept circulating.

In the Netherlands the NCSC advised owners of PHP websites to weigh up taking them offline until a fix was in place. DigiD, MijnOverheid, Overheid.nl and the Tweede Kamer website went offline as a precaution, RIVM took several of its sites down, and the 113 suicide prevention website was offline for hours while its phone line stayed open. The NCSC said it saw no active exploitation in the Netherlands, but it did see a rise in traffic from people probing websites for the weakness. Public bodies in France, Germany, Finland and Belgium took similar steps, according to AAP.

  1. 24 Aug 2026

    Wiz Research reports the flaws to the PHP project in private.

  2. 20 Oct

    PHP announces an emergency security release. Details leak online before it is ready.

  3. 21 Oct, 03:02 UTC

    Cloudflare switches on firewall rules for every plan, free included, and reports attack traffic already hitting customers.

  4. 21 Oct, 13:30 UTC

    PHP releases 8.5.12, 8.4.27, 8.3.36 and 8.2.35. No release for 8.1 or older, only source patches for 7.4 to 8.1.

  5. 21 Oct

    Exploitation observed in the wild. Proofs of concept start circulating.

  6. 21 to 22 Oct

    DigiD, MijnOverheid and RIVM sites go offline as a precaution in the Netherlands, with public bodies in France, Germany, Finland and Belgium.

  7. 23 Oct

    PHP discloses a third remote code execution flaw, limited to unusual setups. No emergency release.

  8. 31 Dec 2026

    PHP 8.2 stops receiving security fixes.

Sources: Wiz Research, CERT-EU, watchTowr, Rijksoverheid, NL Times, Cloudflare via PPC Land, AAP. Full links below.

Why this one is different

Most website breaches come through a plugin, a theme or a weak password. PHP2Shell sits a layer lower, in the runtime that executes your website's code. That is why updating WordPress does nothing for it, and why a five page brochure site is as exposed as a busy web shop.

In plain terms, an attacker sends a specially built request that makes PHP run out of memory part way through handling it. PHP then cleans up badly. Data that was only half set up gets treated as valid, and leftovers from one request survive into the next one the same worker handles. With care, the attacker turns that confusion into running their own code on your server.

  1. 01

    A crafted request

    Sent to any page on the site. No login, no password, nobody on your side clicks anything.

  2. 02

    PHP runs out of memory mid request

    The attacker pushes PHP into a fatal error part way through handling it.

  3. 03

    The clean up goes wrong

    Half built data is treated as valid, and leftovers survive into the next request the same worker handles.

  4. 04

    Attacker code runs on your server

    With care, that confusion becomes remote code execution, with the website's own permissions.

Then within reach

  • Customer database
  • Checkout pages
  • Email sending
  • Backups and keys
  • Other servers on the network
How PHP2Shell works, simplified. Technical detail: Wiz Research and Google Cloud, 21 October 2026.

Who is exposed

PHP runs 69.2% of the websites whose server language is known, according to W3Techs. WordPress, WooCommerce, Drupal, Joomla, Magento and PrestaShop are all built on it. Wiz, the research team that found the flaws, says every PHP version released in the last decade is affected by at least one of them.

Fixed releases exist only for PHP 8.2 to 8.5, the versions PHP still supports. PHP 8.1 lost security support at the end of 2025, and anything older has been unsupported for years. W3Techs counts 34.6% of PHP sites still running version 7 or earlier. For 7.4, 8.0 and 8.1 the PHP security team published minimal source patches, which only help if someone builds and installs them; for anything older there is nothing. Some Linux distributions and paid support vendors ship backports, so the first question for your host is whether yours did.

One more date for the diary: PHP 8.2 stops receiving security fixes on 31 December 2026. If you are patching 8.2 this week, you are also planning an upgrade before New Year.

The part most people will miss

PHP2Shell was found with AI. Wiz Research says AI models from Google and OpenAI helped it find the flaws, adapt working exploits to different PHP versions and validate the fixes, and that a single researcher did the work in about a week. Calif, working with OpenAI, found one of the flaws as well.

That capability is not reserved for researchers who report what they find. The time between a flaw existing and a flaw being used is shrinking, and the oldest, least maintained sites are the easiest to find. A website nobody has touched in three years used to be safe because nobody was looking. Software is looking now, all day.

What ignoring it costs

A server under someone else's control puts the database behind it in their hands, with your customers' names, emails and orders. Under GDPR a personal data breach has to be reported to the Autoriteit Persoonsgegevens, or your national regulator, within 72 hours of you becoming aware of it, and fines can reach €20 million or 4% of worldwide annual turnover, whichever is higher.

If you take payments, an attacker can add a few lines to your checkout that copy card details as customers type them. You usually hear about it weeks later, from your payment provider.

Hacked servers get put to work. They host spam pages that Google can flag as hacked in its results, and they send phishing from your domain until mail providers block it, at which point your real invoices and proposals stop arriving.

And when a breach becomes news, the name in the headline is yours. The hosting company is a footnote.

What to do this week

  1. 1

    Find out which PHP version runs your site.

    Your hosting control panel shows it, or ask your host. A developer can read it from the server in a minute. Write it down with today's date.

  2. 2

    On 8.2, 8.3, 8.4 or 8.5, update today.

    Move to 8.2.35, 8.3.36, 8.4.27 or 8.5.12 or later. Some managed hosts, SiteGround among them, say they patched their servers; get that confirmation from yours in writing rather than assume it.

  3. 3

    On 8.1 or older, get a straight answer and a stopgap.

    Ask your host in writing whether they applied fixes for CVE-2026-109618 and CVE-2026-109619; PHP published source patches for 7.4, 8.0 and 8.1, but someone has to build and install them. Whatever the answer, put a web application firewall in front of the site now. Cloudflare added rules to its free plan. Treat it as time bought while you upgrade.

  4. 4

    Check whether anyone got in first.

    Look for admin users nobody created, files changed recently where they should not be, and new scheduled tasks. Wiz also points to repeated server errors and unusually large session cookies in the logs. If anything looks wrong, restore from a clean backup, rotate every password and key, and tell the people who need to know.

  5. 5

    Decide whether the site needs PHP at all.

    Many company sites are a brochure with a contact form. Rebuilt on a modern static stack, they have no PHP runtime facing the internet, and they load faster as well.

PHP2Shell exposure check

Four questions. Where you stand.

Runs in your browser. Nothing you choose is sent anywhere.

What runs your website?
Which PHP version, and has it been updated since 21 October?
Has your host confirmed in writing that the PHP2Shell fixes are in place?
Is a web application firewall in front of the site?

Answer the questions to see where you stand.

Where we come in

We run a thirty minute website security call. We look at what your site actually runs, tell you plainly where you stand and what to fix first. If a patch is enough, we say so. If the site is overdue a rebuild, we redesign it on a modern stack, the way we built mudagym.com and helionics.io.

Questions

What is PHP2Shell?

PHP2Shell is the name for two critical flaws in the PHP runtime, CVE-2026-109618 and CVE-2026-109619, rated 9.2 out of 10. They let an attacker run code on a web server without logging in. PHP released fixes on 21 October 2026.

Which PHP versions are fixed?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 and later. There is no release for 8.1 or older, which are out of support. PHP published minimal source patches for 7.4, 8.0 and 8.1 for teams that compile PHP themselves, and some Linux distributions and paid vendors ship backports, so ask your host.

Does updating WordPress or my plugins fix PHP2Shell?

No. The flaws are in PHP itself, the runtime underneath WordPress. You need a fixed PHP version, or your host's confirmed backport, with a web application firewall as a stopgap.

The letters

Occasional letters on getting AI into production.

Work email only.