Actively exploited

PHP2Shell, Explained: The AI-Found PHP Flaw That Took Government Websites Offline

AI models helped find two holes that had been hiding in PHP for more than a decade. Within a week, governments were pulling websites offline and attackers were breaking into firewalls. Here's what happened and what to patch.

By the Sphinx Agent Editorial Team · Published · Facts checked against sources up to October 31, 2026.

The short version

  • What: Two critical flaws in PHP itself, CVE-2026-109618 and CVE-2026-109619, both rated 9.2 out of 10. Together they're called PHP2Shell.1,4
  • Why it's serious: A stranger with no password can run their own code on the server, or read passwords and keys out of its memory.2
  • How big: PHP runs about 69% of websites whose server language is known, including WordPress, Drupal and Joomla.13
  • AI's role: Wiz says it used Gemini 4 Argon and GPT-5.6 Sol throughout its research. Calif credits itself, OpenAI and Wiz.2,3
  • Status: Patched October 21, 2026. Under active attack. CISA added both to its Known Exploited Vulnerabilities list on October 26.5
  • Fix: Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35. If you can't, CISA says take the site offline.4

First, what is PHP and why should you care?

PHP is the programming language running behind a huge share of the web. When you log in to a WordPress blog, fill out a form on a small business site, or read a Wikipedia page, there's a good chance PHP is doing the work on the server.

W3Techs puts it at 69.2% of all websites whose server-side language it can detect.13 So when PHP itself has a hole, it isn't one website's problem. It's most of the internet's.

What the flaw actually lets an attacker do

Here's the simple version. An attacker sends a carefully built web request that makes PHP run out of memory partway through handling it. PHP doesn't clean up properly. It leaves behind broken or "stale" leftovers, and the next request picks them up.

With the right setup, those leftovers let the attacker run their own commands on the server. No username. No password. The PHP project says the highest risk is servers using mod_php, where an unauthenticated request can trigger the bug before the website's own code even runs.1

That last part is what scared people. It means a perfectly written, fully updated WordPress site could still be hit, because the problem sits underneath it. Wiz showed working attacks against the latest versions of WordPress, Drupal and Joomla, and also showed it could read memory holding passwords, tokens and API keys.2

Calif, one of the teams that found it, lists attack paths that need no login in WordPress, Drupal, Joomla, MediaWiki, Roundcube, Magento, phpMyAdmin, Nextcloud and Laravel apps.3

This one really is an AI story

In our Binance hack breakdown, we found no evidence that AI was used to break in, despite the rumors. PHP2Shell is different. Here, AI's role is documented by the people who did the work.

Think about that. Wiz says the flaws had been in PHP for "more than a decade," with affected versions going back to PHP 5.4.2 Thousands of skilled people read and tested that code over the years. Then several AI-assisted teams found the same holes within weeks of each other.

That's the good news and the bad news in one sentence. The good guys found it first this time. But if three separate teams can find it with off-the-shelf frontier models, so can anyone else with the same tools.

Timeline

PHP2Shell, from discovery to active attack
Date (2026)What happened
Aug 1Calif finds the first bug.3
Aug 11Calif reports it to the PHP project.3
Aug 19–21Wiz makes its first find. Calif reports the second bug.3
Oct 17Amazon's honeypots see an exploit attempt, four days before the public announcement.6
Oct 20PHP pre-announces a security release. Word leaks on Hacker News, and PHP moves the release up.1,14
Oct 21Patches ship. NSA and CISA warn. Governments across Europe take websites offline.4,7
Oct 23–24A China-linked group breaks into 25 firewalls using the flaw.8
Oct 24A researcher records 35 successful attacks on test servers.6
Oct 26CISA adds both flaws to its Known Exploited Vulnerabilities catalog.5
Oct 29Deadline for U.S. federal civilian agencies to patch. The same evening, Binance loses $6.3 billion in an unrelated attack.6

Why governments told people to take websites offline

Normally the advice after a big bug is "patch soon." This time, several governments said something much blunter: if you can't patch right now, unplug it.

Many did. On October 21, Reuters reported precautionary shutdowns across Europe:7

Picture that for a second. Governments chose to make their own public services unavailable rather than risk them being taken over. That's how bad a no-login, run-any-code bug in the web's most common language is. It's also part of why "be ready" campaigns are getting attention right now, which we cover in our 90-days-without-power fact check.

Who is exploiting it

Attacks are real, but some early claims were overblown. Here's what holds up.

No one has reported a link. Binance says its breach began with a compromised engineer's laptop, not a web server bug.

But the two stories belong together for a different reason. In the same ten days, the web's most popular language had a decade-old hole found with AI, attackers were using it before most companies could patch, and the world's biggest crypto exchange lost $6.3 billion to a state hacking group. Our Binance article lays out the numbers behind this: about 13,000 new vulnerabilities reported in October alone, and companies taking a median of 43 days to fix ones already under attack.

PHP2Shell is what that gap looks like in real life. The fix shipped on day one. The danger comes from every server that still hasn't installed it.

What to do

If you run a website or server

  1. Check your PHP version. Run php -v on the server, or ask your host. Some vendors backport fixes without changing the version number, so ask if you're unsure.10
  2. Update to a fixed release: 8.5.12, 8.4.27, 8.3.36 or 8.2.35. Then restart PHP so the old processes are gone.1,4
  3. On PHP 8.1 or older? There's no official fix. CISA says take it offline until you can upgrade.4 Note that PHP 8.2 itself reaches end of life on December 31, 2026.1
  4. Can't patch today? Put a web application firewall in front of the site, and use the temporary settings the PHP project lists in its advisory. They reduce the risk but don't remove it.1,4
  5. Assume secrets may have leaked. If you were exposed after October 17, rotate database passwords, API keys and session secrets.
  6. Watch for the warning sign. PHP processes starting shell commands is a strong signal that something is wrong.

If you use a managed WordPress host

Ask your host directly whether you're on a fixed PHP build. Some have already confirmed. Kinsta, for example, said customers were protected and didn't need to do anything.10 Don't assume. Ask.

If you just use websites

You can't patch someone else's server. But you can limit the damage if one of them gets breached:

What we still don't know

Frequently asked questions

What is PHP2Shell?

The nickname for two critical PHP flaws, CVE-2026-109618 and CVE-2026-109619, each rated 9.2. They let an attacker with no login run code on a web server or read secrets from its memory.1,2

Which PHP versions are safe?

8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 and older have no official fix.4

Was it really found by AI?

AI played a documented part. Wiz credits Gemini 4 Argon and GPT-5.6 Sol alongside its own Wiz Atlas tool, and OpenAI says its models were used to find and fix the flaws.2,12

Is it being exploited?

Yes. CISA added both flaws to its Known Exploited Vulnerabilities catalog on October 26, 2026.5

Is my WordPress site at risk?

It can be, even if WordPress is fully updated, because the flaw is in PHP underneath it. Ask your host which PHP build you're on.2

Is it related to the Binance hack?

No link has been reported. Binance says its breach started with a compromised laptop.

Sources

  1. The PHP Group, security advisory and release announcements for PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, Oct. 20–26, 2026. php.net
  2. Wiz Research (Sagi Tzadik, Shir Tamari, Nir Ohfeld, Tomer Schwartz), "PHP2Shell: AI uncovers critical RCE in PHP," Oct. 21, 2026. wiz.io
  3. Calif, "PHP2Shell: A tale of two PHP remote vulnerabilities," Oct. 21, 2026. calif.io
  4. CISA, "Critical Vulnerabilities in PHP Require Immediate Patching," Oct. 21, 2026, revised Oct. 26. cisa.gov
  5. CISA, "CISA Adds Two Known Exploited Vulnerabilities to Catalog," Oct. 26, 2026. cisa.gov
  6. The Register, PHP2Shell added to CISA's KEV catalog, Oct. 27, 2026. theregister.com
  7. Reuters factbox via The Star, "Websites taken offline over PHP risks," Oct. 21, 2026. thestar.com.my
  8. SecurityWeek (Ionut Arghire), "China-Linked Hackers Exploit PHP2Shell to Root Firewalls," Oct. 28, 2026. securityweek.com
  9. Wiz, "PHP2Shell: Exploitation Attempts and Remediation Trends," Oct. 27, 2026. wiz.io
  10. Kinsta, PHP2Shell customer notice, Oct. 23, 2026. kinsta.com
  11. 404 Media, "PHP2Shell, Black October: AI is changing everything about hacking," Oct. 22, 2026. 404media.co
  12. Decrypt, "Who found the PHP bug that made governments unplug websites? ChatGPT," Oct. 21, 2026. decrypt.co
  13. W3Techs, "Usage statistics of PHP for websites," accessed Oct. 31, 2026. w3techs.com
  14. SecureWorld, "Patch PHP now: PHP2Shell," Oct. 22, 2026. secureworld.io