Being exploited

PHP2Shell: what the critical PHP flaws mean for your website

On 21 October 2026 the PHP project fixed two critical flaws that let an attacker take over a web server without logging in. PHP runs WordPress and most small-business websites, so this affects a very large share of the web.

Security newsPublished By the Expect Best security team8 min read

The flaws are now being used in real attacks. This guide explains, in plain English, what PHP2Shell is, whether your website is at risk and exactly what to ask your web host.

In short

What it is
Two critical flaws in PHP, the software that runs WordPress and most small-business websites. An attacker can take over an unpatched server without a password.
Is it being used?
Yes. Attacks started before the fix, and the US cyber agency CISA confirmed active attacks on 26 October 2026.
Who fixes it
Your web host or developer, by updating PHP on the server. Updating WordPress or plugins does not fix it.
Safe versions
PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or newer in the same series. PHP 8.1 and older need an upgrade.
What to do now
Ask your host to confirm in writing that your server has the 21 October PHP fixes. There is a message you can copy below.

What PHP2Shell is

PHP2Shell is the nickname for two vulnerabilities in PHP itself: CVE-2026-109618 and CVE-2026-109619. PHP’s security team rates both 9.2 out of 10 on the CVSS severity scale (PHP security advisory).

In simple terms, a specially crafted web request can trick PHP into mishandling its own memory. An attacker can turn that into running their own commands on your server. They need no password, no user account and no vulnerable plugin: the website just has to be online.

  • CVE-2026-109618: PHP runs out of memory part way through setting up a request, then cleans up data it never finished preparing.
  • CVE-2026-109619: leftovers from one request survive in memory, and the next request handled by the same PHP process picks them up.

The affected code goes back to PHP 5.4, released in 2012, so almost every PHP server in use today was exposed until patched (Tenable).

Once inside, an attacker can typically read or change your website, your database and anything else stored on the server, including customer details, email and payment settings.

Who is affected

Any website that runs on PHP and has not been patched. That covers the common ways PHP is served, including PHP-FPM, Apache’s mod_php and LiteSpeed. PHP says servers using mod_php face the most risk, because the attack fires before any of your site’s own code runs.

Researchers demonstrated working attacks against WordPress, Drupal, Joomla and Magento (Tenable). WooCommerce shops and custom PHP sites are in the same position.

The important point for website owners: the flaws sit in PHP, the layer underneath WordPress. Updating WordPress, your theme or your plugins will not close them. Whoever manages your server, usually your host, has to update PHP.

Is it being used in attacks?

Yes. Here is how the last two weeks unfolded:

  1. 17 October 2026Amazon's threat intelligence team records an attempt to use the flaws, four days before any fix exists.
  2. 20 October 2026Technical details of the flaws leak publicly.
  3. 21 October 2026PHP releases fixed versions. Cloudflare and watchTowr report attacks the same day. The UK's National Cyber Security Centre advises organisations to consider taking unpatched systems offline.
  4. 26 October 2026CISA, the US cyber security agency, adds both flaws to its list of vulnerabilities known to be used in real attacks, and orders US federal agencies to patch within three days.

Amazon now says attackers are using the flaws at scale (Help Net Security, BleepingComputer). Not every firm saw attacks straight away: Huntress found none on its partners’ systems on 21 October (Huntress), but the picture has moved on since then.

The story has also reached mainstream news. The BBC explains why it sparked a global scramble in PHP: What is it and why did it spark a global cyber security scramble?.

Which PHP versions are safe

PHP released these fixed versions on 21 October 2026. Any of them, or anything newer in the same series, closes both flaws:

  • PHP 8.5.12
  • PHP 8.4.27
  • PHP 8.3.36
  • PHP 8.2.35

If you run something older:

  • PHP 7.4, 8.0 and 8.1: no official release. PHP shared minimal fixes for people who build PHP themselves. Ask your host what they have installed, or upgrade to a supported version.
  • PHP 7.3 and older: no fix at all. Upgrade.
  • PHP 8.6: still a test version. Release candidate 4 includes the fixes and earlier 8.6 builds do not. Keep live sites off test versions of PHP.

Some hosts patch PHP through their Linux distribution’s packages. A server patched that way can still show an older version number, so ask your host to confirm rather than relying on the number alone.

Not sure whether your PHP version is still supported at all? See how to check for end-of-life PHP.

What to do today

  1. Find your PHP version. Most hosting control panels show it on a page called something like PHP Manager or PHP Version. If you cannot find it, ask your host.
  2. Get your host to confirm the fix. Ask them, in writing, whether your server has the 21 October fixes. Good managed hosts moved fast: on the hosting our own sites run on, patched PHP went live within about an hour of PHP’s release.
  3. On PHP 8.1 or older, upgrade now. Test on a staging copy first if your host offers one, because an old theme or plugin may break on a newer PHP.
  4. Behind Cloudflare? Treat it as a stopgap. Cloudflare added firewall rules against the known attacks for every plan, free included. They only protect traffic that passes through Cloudflare, so you still need the update (Patchstack).
  5. Cannot update today? Your developer can apply the temporary PHP settings listed in PHP’s advisory, which reduce the risk without removing it. For a site that holds customer or payment data, maintenance mode until your host patches is the safer choice.
  6. Check for signs of a break-in. If your server was unpatched for any time since 17 October, read the next sections and ask your host to check the logs.

What to ask your host

Most website owners do not manage their own server, so the quickest route is a short message to your host or web developer. Copy this, add your website address and send it:

Message to copy and send
Hello,

Could you please confirm that the server hosting our website has been patched for the PHP2Shell vulnerabilities (CVE-2026-109618 and CVE-2026-109619)?

In particular:
1. Which PHP version is our site running?
2. Has it been updated to a fixed release (8.5.12, 8.4.27, 8.3.36 or 8.2.35 or newer), or patched by a backported fix?
3. If we are on PHP 8.1 or older, what is the plan to upgrade?
4. Have you seen any signs of attempted attacks on our server since 17 October?

Thank you.

A clear written answer with a version number is what you are after. “We keep our servers up to date” on its own is not a confirmation.

Signs your site may have been hit

Patchstack lists warning signs to look for in your server logs (Patchstack):

  • Unusual multipart form requests followed by out-of-memory errors or HTTP 500 errors.
  • Oversized PHPSESSID cookies.
  • PHP processes restarting with no obvious cause.

None of these proves an attack by itself. If you see them, update PHP first, then treat the server as compromised: change every password and key stored on it, including database, email, payment and API credentials, and check for new admin users or unfamiliar files. Amazon recommends reviewing activity back to 17 October.

Our guide on how to check if your WordPress site is hacked walks through the other signs to look for.

Can a scan tell if you are vulnerable?

An outside scan cannot see your exact PHP patch level unless your server announces it. Many servers do, in a header called X-Powered-By, and attackers read that header to pick their targets.

If your server publishes its PHP version, our free check tells you whether that exact version is open to PHP2Shell, and warns you when it has reached end of life. Hiding the header afterwards takes a few minutes: see how to hide your server version. If your server keeps its version private, your host gives the reliable answer.

Need a hand? If you are not sure who manages your server or what your host told you means, email us and we will help you check, free of charge.

Common questions

What is PHP2Shell?
PHP2Shell is the nickname for CVE-2026-109618 and CVE-2026-109619, two critical flaws in PHP that let an attacker run code on a web server without logging in. PHP fixed both on 21 October 2026.
Is PHP2Shell being used in real attacks?
Yes. Several security firms reported attacks from 21 October, and CISA, the US cyber security agency, confirmed active exploitation on 26 October 2026.
Do I need to update WordPress?
Keep WordPress updated anyway, but it will not fix PHP2Shell. The flaws sit in PHP, so your host needs to install a patched version of PHP on your server.
My site is not WordPress. Am I affected?
If your website runs on PHP, yes. That includes Drupal, Joomla, Magento, WooCommerce and many custom-built sites. Sites built without PHP, such as fully static sites, are not affected.
Which PHP versions fix PHP2Shell?
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, released on 21 October 2026. PHP 8.1 and older get no official release, so upgrade or ask your host what they have installed.
Is my site safe if it is behind Cloudflare?
Cloudflare added firewall rules against the known attacks for all plans, including the free one. Treat them as a stopgap: they only cover traffic routed through Cloudflare, and the PHP update remains the real fix.
My host manages my server. Do I need to do anything?
Confirm it. Check the PHP version in your control panel against the fixed versions, or ask your host to confirm in writing that they installed the 21 October fixes.

Sources

How safe is your website?

A free A to E grade in about 10 seconds. No account needed.

Check my site