PHP2Shell: AI Finds a Critical PHP Flaw, and Site Owners Must Patch Now

Serverschrank mit Netzwerkkabeln in einem Rechenzentrum
Photo by Albert Stoynov on Unsplash

On October 21, the PHP project shipped emergency updates for two critical security flaws now known as PHP2Shell. They let attackers run their own code on web servers without logging in, regardless of which application is running there. Security researchers found the bugs with the help of AI models from OpenAI and Google. For anyone running a WordPress site, an online store, or any other PHP project, the update takes priority over everything else.

Key takeaways

  • The flaws, CVE-2026-109618 and CVE-2026-109619, are rated 9.2 out of 10 under CVSS 4.0 and allow remote code execution without a login.
  • PHP versions 8.5.12, 8.4.27, 8.3.36, and 8.2.35 are fixed; every installation that serves web requests is affected.
  • Security firms Calif and Wiz found the bugs independently in August, using tools that included OpenAI’s GPT-5.6 Sol and Google’s Gemini 4 Argon.
  • According to Amazon, the first exploitation attempt came four days before public disclosure; Cloudflare reports early attacks on its customers.
  • OpenAI coordinated the disclosure through its Patch the Planet initiative and is proposing a five-stage process for AI-discovered vulnerabilities.

Why these flaws are so dangerous

PHP is the programming language behind a large share of the web, from WordPress, Drupal, and Joomla to countless custom applications. Most security flaws live in individual programs or plugins. PHP2Shell sits one level deeper, in the PHP interpreter itself. That means a well-written website offers no protection.

Technically, these are memory management bugs. According to the PHP project, in CVE-2026-109618, out-of-memory handling can interrupt PHP while internal request data is only partly initialized; cleanup then treats the invalid data as valid. In CVE-2026-109619, internal request state survives after its memory has been freed, and a later request handled by the same worker process uses it. Wiz groups a total of four bugs under the two identifiers and says it demonstrated working attacks against WordPress, Drupal, and Joomla. According to Help Net Security, a single unauthenticated request is enough, and the attack fires before any application code runs.

The PHP project says every installation that serves web requests is affected, whether through PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, or LiteSpeed. The risk is highest with mod_php. Wiz writes that nearly every PHP version since 5.4 is affected by at least one of the bugs. According to Fortune, network security company Palo Alto Networks counted 22.6 million potentially vulnerable instances.

What site owners should do now

The only complete fix is updating to one of the four patched versions. If your site runs with a hosting provider, check the control panel to see which PHP version is running, and if in doubt, ask whether the packages have already been updated. According to Help Net Security, Linux distributions and long-term support vendors received the fixes in advance. With their packages, the version number may stay the same even though the bug is fixed, as OpenAI notes in the description of its checker.

Older systems are a harder case. PHP 8.1 and everything below it no longer receive official updates from the PHP project. For 7.4, 8.0, and 8.1, the security team has only published minimal source code fixes for people who compile PHP themselves. Anyone still running one of these versions should treat this as the push for an overdue upgrade. PHP 8.2 also reaches end of support on December 31, 2026.

If you can’t update right away, the PHP project lists settings that reduce the risk, such as disabling session.upload_progress.enabled and capping request sizes. But the project stresses that these do not make an installation safe. Sites behind Cloudflare already have filtering rules; according to Cloudflare CTO Dane Knecht, they are “available to all customers, including free.” Wiz lists possible signs of an attack: unusual upload requests followed by memory errors, clusters of HTTP 500 responses, and unusually large or malformed session cookies. OpenAI has also released a small checker on GitHub that reads a site’s PHP version. However, it can only see what the server reveals and does not detect fixes that distributions have backported.

AI as a bug hunter

How the flaws came to light is remarkable. According to Fortune, California security company Calif hit the first bug on August 1 using OpenAI’s GPT-5.6 Sol and informed OpenAI. Independently, Wiz, now a Google subsidiary, found the flaws on August 19 using its Wiz Atlas tool, Gemini 4 Argon, and GPT-5.6 Sol, and reported them to the PHP security team on August 24. According to Wiz, the models helped not only with finding the bugs but also with adapting attacks to different PHP versions and configurations, work that used to take a lot of manual effort. Raluca Ada Popa, head of Gemini security at Google DeepMind, notes that the vulnerabilities went unaddressed for more than a decade.

OpenAI coordinated the disclosure through its Patch the Planet initiative, which included PHP developers, Wiz, Cloudflare, and US agencies such as the cybersecurity agency CISA. Based on that experience, the company proposes a five-stage process: confirm and fix the bug, notify affected organizations such as hosting and security providers in advance, bring in governments, prepare updates across all products, and finally publish guidance. Like OpenAI’s own specialized model GPT-5.6 Cyber or Anthropic’s free scanner for open source projects, PHP2Shell shows that AI models now do serious work in hunting bugs in old, widely used code.

The coordination did not go entirely to plan, however. Amazon’s MadPot honeypot network, a set of deliberately vulnerable decoy servers, recorded an exploitation attempt on October 17, four days before disclosure, according to Help Net Security. Cloudflare CTO Knecht reports early attacks on customers. According to Reuters, authorities in the Netherlands and Finland took websites offline as a precaution, and the UK’s NCSC advised taking systems offline that cannot be fixed right away.

Bottom line: the window is shrinking on both sides

PHP2Shell is a case study in how AI is changing IT security. The good news: bugs that sat unnoticed for years in one of the most widely used web technologies were found and fixed in an internationally coordinated effort. The less good news: the same tools that help defenders also make it easier for attackers to turn a bug into a working exploit, and this time the defenders’ head start lasted only a few days. OpenAI expects more findings of this magnitude in the coming months. For site owners, the practical takeaway is simple: if you currently bundle updates once a month, set up a faster path for security updates to your server software.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top