Entry.log

Published

PHP2Shell: AI-Discovered Vulnerabilities, a Race to Patch, and Exploitation Before Disclosure

PHP2Shell is a useful case study in a question that is becoming harder to avoid: what changes when AI helps researchers turn an old, difficult-to-exploit bug into a practical attack?

The name refers to two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619. They were fixed in PHP’s October 21, 2026 security release. Researchers demonstrated unauthenticated remote code execution (RCE) and memory disclosure in the PHP engine itself, not just in a particular content-management system.

The episode is not a simple story of “AI found a bug, then attackers copied the exploit.” The vulnerabilities had a long history, several teams contributed to discovery, and Amazon later reported attempts against a honeypot before the public disclosure. That evidence raises difficult questions about what “first” means in vulnerability research, how much an embargo can guarantee, and how defenders should plan when exploit development accelerates.

The timeline behind PHP2Shell

The underlying idea is older than the current AI tooling. Calif’s research timeline traces PHP memory-limit exploitation back to work by Stefan Esser in 2004. In 2020, a PHP bug report described out-of-memory behavior during multipart form handling. A 2024 OSTIF and Quarkslab audit found a related issue, but did not establish an exploitable path.

The key technical pattern was that a fatal error—particularly an out-of-memory condition—could interrupt PHP while internal data structures were only partly initialized. Request shutdown could then free the request’s memory while leaving pointers or other state behind. If a worker survived and handled another request, later code might trust that stale state. In some paths, this could be developed into memory corruption, memory disclosure, or code execution.

The timeline became more concrete in 2026:

  • July 30: Calif says it began examining PHP as part of OpenAI’s Patch the Planet initiative, drawing on the older research as a lead.
  • August 1: Calif reports its discovery date for multiple paths to RCE. Its account says it developed proof of concept work and began coordinated disclosure later that month.
  • August 19: Wiz’s account says its researchers independently found the first vulnerability using Wiz Atlas, Gemini 4 Argon, and GPT-5.6 Sol.
  • August 20–21: Wiz reports confirming unauthenticated RCE against Drupal and WordPress.
  • August 24: Wiz says it reported its findings to PHP’s security team. PHP acknowledged the reports in September.
  • October 20: The PHP project announced an upcoming security release.
  • October 21: PHP published patched releases and the researchers made the vulnerabilities public. OpenAI described the response in its coordination account.
  • October 23: CERT-EU updated its advisory with information about a separate third vulnerability, CVE-2026-115560. This was not one of the two original PHP2Shell CVEs and had different circumstances; it should not be casually folded into the same exploit claim.

The chronology is assembled from separate participants’ accounts, not a single neutral incident report. Calif and Wiz both describe important discovery work; OpenAI says Calif identified a critical flaw using GPT-5.6 Sol and that Wiz independently reported both vulnerabilities. The safest summary is that AI materially assisted research, while multiple human teams and the PHP maintainers were involved in analysis, validation, fixes, and disclosure.

What made the flaws serious

Wiz’s technical write-up groups the two CVEs around several memory-safety problems. One path involved PHP’s upload-progress handling and unserialization, producing a use-after-free and remote process-memory disclosure. Another involved stale state after fatal errors and, in some configurations, OPcache type confusion. Together, the demonstrated chains could reach unauthenticated RCE.

Wiz demonstrated exploit chains against WordPress, Drupal, and Joomla. Those applications helped show the impact, but they were not the root cause: the vulnerable behavior was in PHP. A custom PHP script could be affected too. CERT-EU described both CVEs as critical, with CVSS scores of 9.2, and warned that internet-facing PHP services needed urgent updates.

That scope is the reason headlines referring to “70% of the internet” need care. PHP is widely used, but the percentage is an ecosystem-scale estimate, not a claim that 70% of websites were confirmed vulnerable or exploitable. Actual exposure depends on PHP version, SAPI, configuration, application behavior, and whether a relevant attack path is reachable. At the same time, the issue was not limited to one CMS vendor’s code, which made inventory and patching across hosting environments especially important.

PHP released fixes in versions 8.5.12, 8.4.27, 8.3.36, and 8.2.35. Older branches may require vendor backports or an upgrade path. PHP operators should follow the official PHP security release and their distribution or hosting provider’s guidance. Temporary configuration changes can reduce particular attack paths, but the PHP team’s fixes—not a workaround—are the complete remediation.

AI changed the economics, not the history

The strongest argument for calling PHP2Shell an AI inflection point is not that a model autonomously discovered and exploited PHP. It is that models helped researchers traverse a difficult codebase, identify promising paths, reason about interruption and cleanup behavior, and iterate on exploit development. Wiz says that adapting a memory-corruption chain across PHP versions and applications would previously have demanded extensive specialist effort. Calif describes using a model to help explore out-of-memory triggers and then generalizing the bug pattern into a reusable audit approach.

That is meaningful. A flaw can exist for years without being practically exploitable at scale. If AI reduces the time and expertise needed to connect known bug classes, search code, test hypotheses, and debug a proof of concept, the security boundary changes even if the vulnerable line of code is old. “Nobody exploited it before” becomes weaker evidence of safety when the cost of exploitation falls.

But there are reasons not to turn that observation into an AI triumph narrative. The work depended on people who understood PHP’s history, selected the target, guided the investigation, interpreted results, and coordinated with maintainers. The public accounts also differ on discovery dates and credit, and they are written by organizations with legitimate interests in demonstrating their research and tools. AI was part of a human-led process, not a substitute for expertise or responsible disclosure.

OpenAI argues that this case created a “Defender’s Window”: frontier AI found the vulnerabilities before attackers did, giving maintainers and providers time to prepare. That may describe the researchers’ knowledge and coordinated response. However, it is not the same as proving that no attacker knew about or attempted to exploit the flaw before public release.

The uncomfortable detail: exploitation attempts before disclosure

On October 21, Amazon Threat Intelligence reported PHP2Shell exploitation activity in its MadPot honeypot telemetry dating to October 17, four days before public disclosure. The first observed source used a commercial anonymization network. AWS said the activity suggested a threat actor, but it could not determine how the actor obtained exploit information or whether the attempt would have succeeded against a real system.

AWS also saw additional attempts on October 21, including activity before the embargo lifted at 14:00 UTC. Once the patch and public technical details appeared, proof-of-concept exploits circulated and attempts broadened quickly. The evidence therefore supports a careful formulation: AWS observed pre-disclosure exploit attempts, not confirmed successful compromises attributable to a specific actor.

This complicates the “AI found it first” claim without disproving the defenders’ work. The public record does not tell us whether the October 17 activity came from independent rediscovery, a leak, an insider, or some other source. An embargo reduces the window in which attackers can use published details; it cannot guarantee that a vulnerability remains secret from every capable actor.

It also highlights a practical shift. AWS argues that patch analysis and AI-assisted reverse engineering can compress the time between disclosure and weaponized exploit, potentially to hours or minutes. The old operational rhythm—wait for a public proof of concept, then begin prioritizing—may leave too much time for attackers. AWS recommends patching internet-facing critical systems on an hours-scale, investigating from the earliest known activity rather than the advisory date, and using behavior-based detection rather than relying solely on a CVE signature.

What defenders should take from it

PHP2Shell points to a few durable lessons:

  1. Patch the runtime, not just the application. A clean WordPress or Drupal codebase does not remove a vulnerability in the PHP engine underneath it.
  2. Inventory the whole deployment path. Include PHP versions bundled in products, containers, hosting images, and end-of-life branches—not only the version on a developer’s workstation.
  3. Treat disclosure dates as milestones, not proof of first activity. Review logs and telemetry for the period before public disclosure when credible reporting indicates earlier attempts.
  4. Prepare to move faster after a patch. Test emergency update procedures in advance, especially for internet-facing services and vendors that need to backport fixes.
  5. Support maintainers and coordinated response. Discovery is only useful if maintainers can validate reports, build and test fixes, coordinate distributors, and get updates deployed.
  6. Use AI with evidence and accountability. Models can accelerate code review and exploitability analysis, but findings still need reproducible validation, human review, controlled testing, and a responsible disclosure path.

PHP2Shell is neither proof that AI has made every old bug an imminent exploit nor reassurance that coordinated disclosure always keeps attackers behind. It is evidence that AI can help make difficult vulnerabilities actionable—and that at least one set of exploit attempts appeared before the public release. The defensible response is to improve discovery and coordination while planning for the possibility that secrecy, patch windows, and exploit-development timelines are all less reliable than they used to be.

Sources