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.
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.
- 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.
- 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.
- 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.
- 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.
| CVE | PHP's name for it | Known trigger |
|---|---|---|
| CVE-2026-109618 | Remote code execution via out-of-memory corruption | Malformed multipart (file upload) requests that push PHP to its memory limit |
| CVE-2026-109619 | Remote code execution via stale global state | Session 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.
| PHP branch | Fixed version | Support status | What to do |
|---|---|---|---|
| 8.5 | 8.5.12 | Active support to 31 Dec 2027 | Upgrade now |
| 8.4 | 8.4.27 | Active support to 31 Dec 2026 | Upgrade now |
| 8.3 | 8.3.36 | Security fixes to 31 Dec 2027 | Upgrade now |
| 8.2 | 8.2.35 | Security fixes end 31 Dec 2026 | Upgrade now, then plan a move off 8.2 |
| 8.1 and older | None from PHP | End of life | Vendor 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.
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 agency | What 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 |
| Australia | Several government department sites were temporarily unavailable while risks were mitigated |
| Japan | The prime minister asked site owners to patch or suspend; parts of some government sites went offline |
| Netherlands, Finland, Germany, Belgium, Czech Republic | Government sites shut down to apply the patch, including the Dutch cyber security agency's own |
| France, Denmark | Government 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:
- Amazon caught a first exploit attempt in its honeypots on 17 October and now calls PHP2Shell broadly exploited.
- Cloudflare reports attack traffic against its customers, with attackers changing payloads to slip past its rules.
- watchTowr and Hadrian report active exploitation, mostly through the session upload progress path.
- NCSC-NL is investigating first signs of successful misuse; HKCERT says both CVEs are exploited.
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.
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:
- Ubuntu: USN-8948-1 and USN-8948-2 (older releases through Ubuntu Pro ESM)
- Debian 13: DSA-6574-1 (php8.4 8.4.27-1~deb13u1)
- Red Hat Enterprise Linux 9: RHSA-2026:87072 (php:8.2 module to 8.2.35)
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:
| Setting | Blocks | Trade-off |
|---|---|---|
session.upload_progress.enabled = 0 | Confirmed session path of CVE-2026-109619 | Upload progress bars stop working |
memory_limit = -1 | The out-of-memory trigger of CVE-2026-109618 | One request can use all server memory |
fatal_error_backtraces = 0 (PHP 8.5) | Backtrace path of CVE-2026-109619 | Fatal errors lose their backtrace |
Tight post_max_size and proxy request limits | Oversized multipart requests | Large 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:
- PHP worker processes (php-fpm, httpd, apache2, php-cgi) starting shells or tools such as sh, bash, python, perl, curl or wget
- Bursts of malformed upload requests followed by memory errors or repeated HTTP 500 responses
- Unusually large or malformed
PHPSESSIDcookies - Commands such as
whoami,idoruname -arun by the web server user - New files in the web root, new scheduled jobs or new admin accounts
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.
That plan only works if three things are true:
- You have backups from before 17 October that an attacker on the server could not reach or alter, kept offsite or immutable.
- Those backups actually restore, and you have tested a restore recently.
- You know how long a full restore takes, and the business can live with that downtime.
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.
Sources
- PHP security advisories (GitHub)
- CISA: Critical Vulnerabilities in PHP Require Immediate Patching
- Brandefense: PHP2Shell analysis and timeline
- watchTowr: PHP2Shell FAQ
- Tenable: php2shell FAQ
- University of Washington IT: Critical PHP vulnerabilities
- Axios: How AI exposed the PHP flaw
- Fortune: The race to patch PHP
- Al Jazeera: World leaders warn of PHP flaws
- PBS NewsHour: The rush to patch
- ABC7: Websites shut down globally
This article reflects public information as of 23 October 2026. Check your vendor's advisory for the latest package versions.
