PHP2Shell: what a WordPress site owner should do (October 2026)

On 21 Oct 2026 PHP shipped critical security releases: two flaws allow code execution on the server without logging in. Updating WordPress or plugins does not help — PHP itself must be updated. How to check your version, what to ask your host and when you need a person.

5 min read

In this article
  1. What happened?
  2. Does this affect my WordPress site?
  3. How to check your PHP version
  4. What to do in your situation
  5. What not to do
  6. Have I already been hacked?
  7. Frequently asked questions
  8. When you need a person

On 21 October 2026 the PHP project shipped critical security releases: two flaws, which the press has nicknamed "PHP2Shell", let an attacker run code on your server without logging in at all. This is not a WordPress bug but a bug in PHP itself, the runtime WordPress runs on, so updating WordPress core, your theme or your plugins does not help — PHP has to be updated. If your host has already done that, there is nothing for you to do; if not, it is a few minutes of work, but it has to happen now.

The facts below come from the official php.net announcement and were checked on 23 October 2026.

What happened?

Advance notice 20 Oct 2026
Fixes released 21 Oct 2026
Flaws CVE-2026-109618 (code execution via out-of-memory corruption) and CVE-2026-109619 (via stale global state)
Risk unauthenticated remote code execution
Fixed versions PHP 8.2.35, 8.3.36, 8.4.27, 8.5.12
Older branches 8.1 and older no longer get official updates; the PHP security team published minimal source backports for 7.4, 8.0 and 8.1 on GitHub, but these are not regular releases

The PHP team is blunt: there are no complete mitigations without updating, and updating is the only safe choice. The partial measures listed (for example memory_limit=-1, disabling session.upload_progress) do not close the hole.

Whether the flaws are already being exploited is disputed: some security vendors report attempts from before disclosure, others see no such evidence. In practice it does not matter: once a flaw is public, scanning for vulnerable servers starts within hours.

Does this affect my WordPress site?

Yes, if the server's PHP version is older than the fixed one. It makes no difference that WordPress is current, plugins are updated or a security plugin is active — all of them run inside PHP, and the flaw is in PHP.

The three most common cases:

  • Managed WordPress hosting. Most providers updated PHP within the first day. Check anyway — how is shown below.
  • cPanel, Plesk or a similar control panel. You often pick the PHP version yourself, so the server admin may have updated one version while your site uses another.
  • Your own VPS or dedicated server. Nobody will update it for you. If someone else set the server up long ago and nobody has looked after it since, this is the riskiest case.

How to check your PHP version

1. In the WordPress admin. Tools → Site Health → "Info" tab → "Server" section → "PHP version". This is the most reliable way, because it shows the PHP your site actually uses.

2. In your hosting panel. cPanel — "Select PHP Version" or "MultiPHP Manager"; Plesk — the site's "PHP Settings"; other panels have a similarly named section. If you only see "8.3" without a third number, open WordPress Site Health — it shows the full number.

3. On the server. php -v on the command line. Note: the command-line PHP and the PHP-FPM serving your site can be different versions, so Site Health still has the final say.

A version equal to or newer than 8.2.35, 8.3.36, 8.4.27 or 8.5.12 — you are fine. Lower — read on.

What to do in your situation

Your situation What to do
Managed hosting, old version Write to support: "Have you updated PHP for CVE-2026-109618 and CVE-2026-109619? My site shows PHP x.y.z." Ask for a reply with the version number.
cPanel / Plesk, old version Switch the site to the fixed version of the same branch in the panel (for example 8.3.x → 8.3.36). Take a backup first.
Own VPS, PHP 8.2–8.5 Update the PHP packages through the system package manager and restart PHP-FPM. Confirm the web server uses the updated version.
PHP 8.1, 8.0 or 7.4 There are no official releases. Either move to 8.2+ (old themes and plugins may need compatibility work) or use a distribution / hosting backport if your vendor published one. If neither exists, this is a job for a person.
You do not know who looks after the server This is the most important signal. Find the responsible person today, not "when there is time".

What not to do

  • Do not expect a security plugin or WAF to solve it. Some network providers published temporary firewall rules — they reduce the risk but do not remove it. They are help while you update, not a replacement.
  • Do not jump several PHP branches without a backup. Going from 7.4 to 8.4 can break an old theme or plugin. Backup first, then update, then check.
  • Do not take the site offline "just in case". It does not get any safer, and your customers stop seeing it.

Have I already been hacked?

Signs worth checking after updating: unfamiliar administrators in the WordPress users list, new .php files in wp-content/uploads, changed modification dates on wp-config.php or .htaccess, redirects to other sites, unexpected server load. The WP-CLI command wp core verify-checksums shows whether core files were altered.

If you find even one sign, updating is not enough: the site has to be cleaned, every password and key changed, scheduled tasks checked. That is no longer a five-minute job.

Frequently asked questions

Is updating WordPress enough?

No. The flaw is in PHP, not WordPress. The latest WordPress 6.x on PHP 8.3.35 is vulnerable; on 8.3.36 it is not.

My host is silent. What now?

Write with specific numbers (the CVEs and your PHP version) and ask for a reply with a version number. If there is no answer within a day and you cannot change PHP yourself in the panel, that is a reason to look for another provider.

My site runs on PHP 7.4. Do I really have to change?

PHP 7.4 has been officially unsupported since the end of 2022. Today that means not just this flaw but every flaw found since. Moving to 8.2+ with a backup and a compatibility check is less risky than staying.

When you need a person

If you can see the PHP version but cannot change it; if the server is yours and there is no admin; if the site stopped working after the update; if you suspect a break-in. We check the version, update with a backup, adapt themes and plugins to the new PHP, and put the server and firewall in order. Describe what Site Health shows and which hosting you use, and we will tell you what to do.

More on what we do with existing WordPress sites — WordPress & WooCommerce maintenance and fixes.

More posts

All posts