Skip to content
Economy Media Stay Informed Anytime, Anywhere
Tech

PHP Rushes Out Emergency Fixes for AI-Found ‘PHP2Shell’ Flaws

PHP patched two critical flaws, found with AI tools by Wiz, Calif and OpenAI, that could let attackers take over millions of websites.

The official PHP programming language logo
Image: Wikimedia Commons / Colin Viebrock, Public domain

The maintainers of PHP, the programming language behind a large share of the world’s websites, released emergency security updates on Wednesday for two critical flaws that could let attackers take control of web servers without logging in. The bugs, collectively nicknamed “PHP2Shell,” were uncovered by security researchers using artificial intelligence tools. Website operators are now racing to install the fixes before criminals can exploit them.

What happened

The two vulnerabilities, tracked as CVE-2026-109618 and CVE-2026-109619, sit in PHP’s core engine rather than in any single application. That means they can affect sites regardless of how their own code is written. According to Wiz, the cloud security company owned by Google that published a detailed technical write-up, the flaws carry severity scores of up to 9.2 out of 10.

BleepingComputer reported that fixed versions are PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. The weaknesses affect PHP installations that serve web requests, including common setups such as PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The PHP project said in its advisory that it considered the risk “highest for mod_php,” citing a demonstrated exploit in which an unauthenticated request can trigger the attack before any application code runs.

Accounts differ slightly on how far back the problem goes. TechCrunch reported that the flaws exist in every PHP version since PHP 5, released in 2004, while Wiz said nearly every version is affected, including releases back to PHP 5.4, and that every version from the past decade has at least one vulnerable issue. PHP 8.1 and older no longer receive official updates, though BleepingComputer said minimal source backports exist for PHP 7.4, 8.0 and 8.1, and some Linux distributions and long-term support vendors offer their own fixes.

Government agencies issued blunt warnings. TechCrunch reported that the US National Security Agency flagged the flaws and advised that sites that cannot be patched right away should be taken offline until they can be. BleepingComputer said the UK’s National Cyber Security Centre gave organizations similar advice: update immediately or disconnect.

How AI found the bugs

Wiz said its researchers used its own Wiz Atlas AI agent along with Google’s Gemini 4 Argon and OpenAI’s GPT-5.6 Sol models. Separately, Calif, a security testing firm working on OpenAI’s “Patch the Planet” initiative to find flaws in open-source software, used GPT-5.6 Sol to find one of the bugs, TechCrunch reported, citing an OpenAI blog post.

According to Wiz, all of the issues are memory-safety bugs in how PHP handles fatal errors, especially when a request runs out of memory. A failed request can leave behind corrupted internal data that a later request on the same server process reuses, giving an attacker an opening. Wiz said it chained the bugs into working attacks that required no login against WordPress, Drupal and Joomla, three of the most popular website-building platforms.

Wiz’s timeline shows the first bug was found on Aug. 19, and the flaws were reported to PHP’s security team on Aug. 24. PHP acknowledged the reports on Sept. 21 and published patches and public details on Oct. 21. Before disclosure, Wiz said, it worked with major infrastructure companies including Automattic, Akamai, Amazon Web Services, Cloudflare, Fastly, Imperva, Microsoft and Vercel so that they could offer temporary protections to customers.

Raluca Ada Popa, head of Gemini security at Google DeepMind, said in Wiz’s post that the work showed “why frontier AI is a game-changer for cyber defense.”

Why it matters

PHP runs roughly 70% of websites, according to Wiz and TechCrunch, which estimated that figure at more than 33 million sites. BleepingComputer, citing VirusTotal data, said more than 5.1 million PHP hosts are directly exposed to the internet. A successful attack could let an intruder reach a server’s files or the databases behind a web application.

The episode also illustrates a double edge of AI in security. Wiz wrote that these kinds of bugs had previously been too difficult for most hackers to exploit, but that large language models can now help adapt an attack to different PHP versions, configurations and memory layouts, lowering that barrier.

Sources also disagree on whether attacks have already begun. OpenAI said researchers found the flaws before hackers did and that there were no reports of exploitation in the wild, according to TechCrunch. But Dane Knecht, chief technology officer of Cloudflare, said the company was already seeing early attacks targeting both vulnerabilities before the patches were released, BleepingComputer reported.

What comes next

Researchers and the PHP project say updating is the only complete fix. Gina Peter Banyard, a PHP core developer, warned that no temporary mitigation would fully block attacks, according to BleepingComputer. Cloudflare said it had deployed firewall rules against known attack methods but described them as stopgaps. Interim steps described by PHP and Wiz include:

  • Disabling the session upload progress feature and restarting server workers
  • Lowering limits on the size of incoming requests
  • Watching for repeated server errors, malformed session cookies or unexplained worker crashes

WordPress said the flaw is not specific to its software and that site owners must make sure their servers are patched, working with their hosting providers where needed. With tens of millions of sites potentially affected, much of that work will fall to hosting companies in the coming days.