Security alert · 23 October 2026

PHP2Shell explained: why websites went offline worldwide, and what to do now

On 21 October 2026, government websites across the world went dark on purpose. Two critical flaws in PHP, the language behind roughly 70% of websites, were found with AI and leaked before the patch. Here is what happened, in plain English, and a step-by-step plan to protect your business.

~70%of websites run on PHP
9.8NVD severity score (CVSS 3.1)
4 daysattacks began before any patch existed
884Kpublic hosts on old PHP with no official fix

Key takeaways

  • What: two remote code execution bugs in PHP itself, CVE-2026-109618 and CVE-2026-109619, nicknamed PHP2Shell.
  • Risk: an attacker needs no login. One crafted web request can be enough.
  • Who: every PHP release before 8.2.35, 8.3.36, 8.4.27 and 8.5.12 that serves web traffic, including WordPress, WooCommerce, Drupal, Joomla and Magento sites.
  • Fix: upgrade PHP and restart it. Updating WordPress or plugins does not help.
  • On PHP 8.1 or older? There is no official release. Get a vendor backport, upgrade, or take the site offline.

What actually happened

This was not a classic outage. No cloud region failed and no DNS broke. Instead, a security emergency forced site owners to choose: stay online with a door anyone could open, or go offline until they patched.

  1. AI found the bugs. Researchers from Calif, OpenAI and Wiz used AI models to dig through PHP, code the security community has studied for decades. They found two flaws that let a stranger run their own code on a web server.
  2. The secret leaked. PHP planned a coordinated release for 21 October at 14:00 UTC. A day early, the CVE numbers surfaced on Hacker News and social media.
  3. Governments acted. The US NSA told organisations to take PHP systems offline if they could not update right away. Japan's prime minister made the same public request. Agencies across Europe and Australia followed.
  4. The patch landed. PHP shipped fixed versions, and sites came back one by one as admins upgraded and restarted their servers.

So when people said "the internet broke", what they saw was thousands of sites switched off deliberately. That was the healthy response. The real worry is the sites that stayed online without patching.

How a PHP2Shell attack works

Both flaws live in the PHP runtime, the engine that reads every web request before your website code sees it. That is why your login page, your security plugin and your strong passwords cannot stop this attack.

1. Attacker sends one crafted request No login or password needed 2. PHP reads the request before WordPress or your app even runs Bug 1 · CVE-…618 PHP runs out of memory mid-request, then trusts half-built data Bug 2 · CVE-…619 Leftover data from an earlier request is reused after it was freed 3. Memory is corrupted attacker's code runs as your web server 4. Web shell planted data theft, ransomware, a way back in The fix sits at step 2: upgrade PHP itself
One malformed request triggers either bug inside PHP. Plugins, logins and CMS updates never get a chance to step in.
CVEPHP's name for itKnown trigger
CVE-2026-109618Remote code execution via out-of-memory corruptionMalformed multipart (file upload) requests that push PHP to its memory limit
CVE-2026-109619Remote code execution via stale global stateSession upload progress after a fatal error; fatal error backtraces on PHP 8.5

On Apache with mod_php, the PHP security team confirmed the attack works without login, before any application code runs. On PHP-FPM, used by most Nginx sites and many managed hosts, the risk depends on the application, but popular CMSs do the session handling the attack needs. Wiz says it chained both flaws and ran them in its lab against current WordPress, Drupal and Joomla.

Is your website affected?

If your site runs on PHP and has not been updated since 21 October 2026, assume yes. PHP says every installation serving web requests is at risk: PHP-FPM, Apache mod_php, php-cgi, FrankenPHP and LiteSpeed.

Your pages, products, content CMS and plugins WordPress, WooCommerce, Drupal, Magento PHP runtime PHP2Shell lives here Web server Apache, Nginx + PHP-FPM, LiteSpeed Server, hosting, operating system Updating this won't fix it Upgrade this and restart it
Your website is built in layers. The flaw is in PHP, one layer below WordPress, so only a PHP upgrade closes it.
PHP branchFixed versionSupport statusWhat to do
8.58.5.12Active support to 31 Dec 2027Upgrade now
8.48.4.27Active support to 31 Dec 2026Upgrade now
8.38.3.36Security fixes to 31 Dec 2027Upgrade now
8.28.2.35Security fixes end 31 Dec 2026Upgrade now, then plan a move off 8.2
8.1 and olderNone from PHPEnd of lifeVendor backport, upgrade, or take offline

The long tail is the real problem. Check Point counted about 884,000 internet-facing hosts showing PHP 8.1 or older on 20 October. Many belong to small businesses that do not know which PHP version their site runs.

On shared hosting? Your host patches PHP, not you. Some large hosts patched managed WordPress plans on day one but left VPS customers to update themselves. Ask your host in writing which PHP build your site runs and whether it carries the fix.

Timeline: ten weeks of secrecy, four days of attacks

The researchers reported the bugs privately in August. Attackers had a working exploit before the patch shipped.

11 Aug Calif reports the first bug to PHP 19–24 Aug Wiz finds and reports a flaw 21 Sep PHP confirms, starts a quiet fix 17 Oct First exploit attempt seen by Amazon Four days before any patch existed 20 Oct CVE IDs leak on Hacker News PHP announces an emergency release 21 Oct 03:02 Cloudflare switches on WAF rules 21 Oct 13:45 NSA: patch now or take systems offline Governments start pulling websites 21 Oct 14:00 Fixed PHP versions released 22 Oct First signs of successful attacks reported
All times UTC. Sources: PHP, CERT-EU, Amazon, Cloudflare, NSA and NCSC-NL, as compiled by Brandefense.

Why so many websites went offline at once

A few hours offline costs far less than a breached server. With no login needed and exploit code circulating, governments chose to switch their own sites off.

Country or agencyWhat it did
United States (NSA, CISA, FBI)NSA issued a rare public warning to take systems offline if they could not update; CISA urged immediate patching; the FBI warned of remote code execution
United Kingdom (NCSC)Told organisations to find every PHP system and patch internet-facing ones first
AustraliaSeveral government department sites were temporarily unavailable while risks were mitigated
JapanThe prime minister asked site owners to patch or suspend; parts of some government sites went offline
Netherlands, Finland, Germany, Belgium, Czech RepublicGovernment sites shut down to apply the patch, including the Dutch cyber security agency's own
France, DenmarkGovernment websites temporarily taken offline

The lesson for business owners: taking a site offline is a legitimate security control. If you cannot patch tonight, a maintenance page beats a compromised server leaking customer data for months.

Are hackers already using PHP2Shell?

Yes, attempts are widespread, though confirmed breaches are still thin on the public record. As of 23 October 2026:

Public proof-of-concept code exists, so automated scanners are already sweeping the internet for unpatched PHP.

What to do right now

Follow this path. It takes most small business sites under an hour, if you or your host move today.

No Yes Yes No Yes No Does your site run on PHP? Not affected by this Already on 8.2.35, 8.3.36, 8.4.27, 8.5.12 or later? Restart PHP and confirm the version Can you patch tonight? Upgrade PHP, restart all workers Apply php.ini mitigations + WAF, or take the site offline Then: check logs back to 17 October Signs of attack? Isolate the server and rebuild from a clean backup
Every branch ends in the same place: confirm nobody got in before you patched.

Step 1: Find every PHP runtime

List every server, container, control panel and appliance that ships PHP. Then check the version your web server actually loads, not just the command line one:

php -v
php-fpm -v
php -i | grep -i session.upload_progress
curl -sI https://yourdomain.com | grep -iE "^(server|x-powered-by):"

A missing X-Powered-By header does not mean you are safe. It only means PHP is not advertising itself.

Step 2: Patch internet-facing servers first

Upgrade to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or install your Linux distribution's fixed package. Distribution packages keep their own version numbers, so check the vendor notice:

Step 3: Restart PHP

This step gets missed constantly. Running PHP-FPM workers keep the old, vulnerable code in memory until you restart them. Restart PHP-FPM or Apache, then confirm the version again.

Step 4: Can't patch tonight? Reduce the risk

PHP says no workaround makes you fully safe. These settings only close the known attack paths:

SettingBlocksTrade-off
session.upload_progress.enabled = 0Confirmed session path of CVE-2026-109619Upload progress bars stop working
memory_limit = -1The out-of-memory trigger of CVE-2026-109618One request can use all server memory
fatal_error_backtraces = 0 (PHP 8.5)Backtrace path of CVE-2026-109619Fatal errors lose their backtrace
Tight post_max_size and proxy request limitsOversized multipart requestsLarge uploads may fail

Set these in php.ini, the PHP-FPM pool or the web server configuration, never with ini_set() or .user.ini, and restart every worker. A web application firewall adds a layer, but attackers are already varying payloads to get past them. Still cannot patch? Take the site offline.

Step 5: Look for signs of compromise

Check logs back to at least 17 October for:

Patching closes the door. Backups get you back.

If a server was breached between 17 October and the moment you patched, upgrading PHP does not remove the attacker. The safe path is to rebuild from a backup you know is clean.

Clean restore points Exposure window Patched ? ? ? 10 Oct 17 Oct 21 Oct You patch Restore from before 17 October, patch, then reconnect. Backups from the red window need checking before use.
The first exploit attempt was seen on 17 October. Anything backed up after that, on an unpatched server, could carry the attacker's foothold.

That plan only works if three things are true:

This is where many small businesses get caught out. A backup job that shows a green tick every night is not the same as a restore that works on the day you need it.

The bigger lessons

AI has changed the speed of security

PHP is one of the most studied codebases on earth, and the researchers did not expect to find anything critical. AI found it anyway. The same tools are available to attackers, so the gap between "bug found" and "bug exploited" is shrinking from months to days.

"Set and forget" websites are a liability

If nobody in your business can say which PHP version your site runs within five minutes, that is the first risk to fix. Note that support for PHP 8.2 ends on 31 December 2026, and active support for 8.4 ends the same day.

Patching is a process, not a button

Breaches happen in the gap between "we updated" and "we are safe": the forgotten staging server, the worker never restarted, the vendor appliance with its own PHP. You need an inventory, a priority order and a check afterwards.

Decide on downtime before the emergency

Governments chose to go offline for hours. Could your business? A simple maintenance or failover plan, agreed in advance, turns a panic into a routine change window.

Frequently asked questions

What is PHP2Shell?

PHP2Shell is the nickname for two critical remote code execution flaws in the PHP interpreter, CVE-2026-109618 and CVE-2026-109619. They let an attacker run code on a web server without logging in. PHP patched them on 21 October 2026.

Why were so many websites down on 21–22 October 2026?

Governments and companies deliberately took PHP-based sites offline to patch them. The US NSA, CISA and Japan's prime minister all advised going offline if an immediate update was not possible.

Is WordPress affected by PHP2Shell?

Yes. The flaw is in PHP, which WordPress runs on, so updating WordPress or plugins does not fix it. You or your host must upgrade PHP itself.

Which PHP versions fix PHP2Shell?

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older get no official release; use a vendor backport or upgrade to a supported branch.

Was PHP2Shell found by AI?

Yes. Researchers from Calif, OpenAI and Wiz used AI models to find both flaws.

Is PHP2Shell being exploited?

Amazon saw exploit attempts from 17 October, and Cloudflare, watchTowr, Hadrian, NCSC-NL and HKCERT have reported exploitation activity since disclosure.

Does Cloudflare protect my site from PHP2Shell?

Cloudflare enabled WAF rules for free and paid plans on 21 October. A WAF lowers risk but does not fix PHP, and attackers are already varying their payloads. Patch PHP anyway.

Not sure where your business stands?

We help small and mid-size businesses in Ontario, across Canada and in the United States answer three questions fast: Are we exposed? Are we patched? And if the worst happens, can we restore cleanly?

  • Recovery readiness review: a structured look at your backups, critical systems and recovery objectives.
  • Backup and restore testing: we prove backups by restoring them, not by reading a green tick.
  • Patch and exposure review: we inventory your PHP and server stack and build a patch order.

Talk to ExcelyTech Check your recovery readiness

Sources

This article reflects public information as of 23 October 2026. Check your vendor's advisory for the latest package versions.