AI Explained

PHP2Shell: AI Found a 14-Year-Old Bug in the Code Behind 70% of the Web

AI tools helped find PHP2Shell, two critical PHP flaws hidden for about 14 years. Then details leaked, attacks hit millions and sites went dark. The story.

Watch the Short

The 60-second version is on YouTube. This article is the full story.

New Shorts every week on tech trivia, AI and gadgets.

Subscribe to TheTechPrana

Key takeaways

  • PHP2Shell is a pair of critical PHP flaws (CVE-2026-109618 and CVE-2026-109619) that let attackers run their own code on a website without logging in.
  • Security firms Calif and Wiz found them with help from AI models from OpenAI and Google. The affected code dates back about 14 years.
  • After details leaked, the fix was rushed out on 21 October 2026. Attacks jumped to millions and several government sites went offline. If you run PHP, update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35.

For about 14 years, a set of bugs sat quietly inside the software behind a huge share of the world’s websites. In 2026, AI helped find them – and within hours of the news going public, attackers were trying to use them on a massive scale.

The Short above tells it as a thriller. Here’s the full story, and what it means if you run a website.

What is PHP, and why does it matter?

PHP is a programming language that runs on web servers. It builds pages on the fly – every time you load a WordPress blog, an online shop or many news sites, PHP is often doing the work behind the scenes.

It’s everywhere. Security firm Wiz cites an estimate that PHP powers about 70% of websites, including popular platforms like WordPress, Drupal and Joomla. (That figure is an estimate, but PHP’s reach is undeniably huge.)

So a serious bug in PHP itself isn’t a problem for one website. It’s a problem for millions.

The hunt: AI finds what humans missed

The story starts in summer 2026:

  • On 1 August, security firm Calif found the first piece of the problem, using an OpenAI model.
  • Weeks later, Wiz found the bugs independently, with help from AI tools including Google’s Gemini. Wiz says it found its first flaw on 19 August and had a working attack against Drupal and WordPress within days.
  • On 24 August, Wiz reported its findings to the PHP team.

The flaws were old. Wiz says every PHP version back to PHP 5.4, released in 2012, contains at least one of them. Human reviewers had looked at this code for years without spotting the problem. AI-assisted analysis found it.

Wiz called the moment “an AI inflection point”.

Why PHP2Shell is so dangerous

PHP2Shell is two linked vulnerabilities, tracked as CVE-2026-109618 and CVE-2026-109619. Both are rated 9.2 out of 10 for severity.

In plain terms, they let an attacker:

  • Run their own code on a website’s server – this is called remote code execution (RCE).
  • Do it without logging in – no password or account needed. A specially crafted web request is enough.
  • Read memory they shouldn’t, which could leak passwords, login tokens and API keys.

Wiz demonstrated working attacks against standard, out-of-the-box installs of WordPress, Drupal and Joomla. And because the bug is in PHP itself, installing a WordPress plugin or update can’t fix it – PHP has to be updated.

The race: a quiet fix, then a leak

For about two months, the researchers worked privately with the PHP team on a fix. This is normal “coordinated disclosure”: fix first, announce later, so attackers don’t get a head start.

The plan was to go public on 22 October. But details – including the CVE numbers and a proof-of-concept attack – leaked early. The PHP team rushed the release forward and published the fixes on 21 October 2026.

21 October: the web under fire

What happened next showed how fast attackers move:

  • Cloudflare saw exploit attempts jump from tens of thousands in the first hour to millions by that evening.
  • Government websites in four European countries – France, Denmark, Finland and the Netherlands – went offline.
  • Japan’s ANA airline suspended some web pages, and the Internet Archive was temporarily offline.
  • The UK’s National Cyber Security Centre told organisations to update PHP immediately or take sites offline until they could.

The twist: someone knew early

Amazon’s security team later reported that its honeypot network – decoy servers set up to catch attackers – recorded someone probing the PHP2Shell bug on 17 October, four days before it was public. Someone, it seems, already knew.

The bigger picture: AI cuts both ways

PHP2Shell is a preview of cybersecurity in the AI era:

  • AI helps defenders. It found serious bugs that had survived 14 years of human review.
  • AI can help attackers too. The same tools that find bugs can help write exploits, and much faster than before.
  • The window is shrinking. Once a flaw is known, attacks can start within an hour. Patching “next week” may be too late.

It’s also not completely over. Shortly after the fixes, PHP warned about another, separate flaw (CVE-2026-115560) that was still being worked on.

What to do if you run a PHP website

  1. Update PHP itself to a fixed version: 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or later). Updating WordPress or its plugins is not enough.
  2. On shared hosting? Check with your host that PHP has been patched, and that your site isn’t stuck on an old PHP version.
  3. Using an older PHP version (8.1 or below)? It’s no longer officially supported. Upgrade to a supported version.
  4. Check your logs back to 17 October for unusual activity, and change passwords and API keys if you see anything suspicious.

(This site, techprana.org, isn’t affected: it’s built as plain web pages and doesn’t run PHP.)

Quick recap

  • 2012: affected code present from PHP 5.4 onwards
  • Aug 2026: Calif (with an OpenAI model) and Wiz (with Gemini) find the flaws
  • 17 Oct: someone probes the bug before it’s public
  • 21 Oct: details leak; fixes rushed out; attacks hit millions; government sites go dark
  • Fix: update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35

Your turn: defenders or attackers – who wins the AI security race? Tell us in the YouTube comments.

Sources

  1. Wiz Research: PHP2Shell
  2. Fortune: AI tools discovered the PHP vulnerability that could take down 70% of the internet (21 Oct 2026)
  3. BleepingComputer: PHP ships emergency patches for critical PHP2Shell flaws
  4. Help Net Security: PHP2Shell – critical PHP vulnerabilities patched (21 Oct 2026)
  5. ABC7 New York: Websites shut down globally over AI-detected PHP flaw (22 Oct 2026)
  6. The Hacker News: Someone tried to exploit PHP2Shell 4 days before disclosure
PHP2ShellCybersecurityAIPHPWordPress