Back to blog

PHP2Shell or how AI revives forgotten vulnerabilities

PHP2Shell or how AI revives forgotten vulnerabilities

PHP2Shell: AI revives forgotten vulnerabilities

October 21, 2026, will go down in web security history for how a flaw was discovered, not just for its severity. Two vulnerabilities in PHP’s core—CVE-2026-109618 and CVE-2026-109619, collectively known as PHP2Shell—received a CVSS 4.0 score of 9.2 out of 10 and allowed unauthenticated remote code execution. PHP powers nearly 70% of websites whose server-side language can be identified, according to W3Techs. But what is truly new is that frontier models helped uncover the flaws, and the first associated offensive activity was detected four days before public disclosure, according to Amazon Threat Intelligence’s MadPot honeypots.

This story brings together obscure memory management problems, clues that had already raised concerns years earlier, and exploitation whose technical cost has been reduced by artificial intelligence. The rules governing the defensive window are changing: the time between “a flaw exists” and “someone is trying to exploit it” has shrunk to hours, while our internal inventory, testing, and deployment processes are still measured in days. So: how many security decisions still rely on difficulties that AI is eliminating?

A story that begins long before 2026

The background dates back to 2004. According to researcher Ryan Austin of Calif, Stefan Esser discovered a remote vulnerability involving PHP’s memory limit that year. It is a precedent for this class of problems, not proof that the two current flaws had been identified back then.

Calif’s research.

Another signal appeared in 2020: report #78876 described how long variables in multipart requests could exhaust memory and leave temporary files undeleted. This seemingly limited behavior would become relevant again years later.

Original PHP report.

The turning point came in 2024. The PHP Foundation explains that, while fixing a finding from the audit conducted by Quarkslab and organized by OSTIF, a developer found the first signs of the memory exhaustion problem later associated with CVE-2026-109618. The possibility of exploitation was raised, but no concrete attack vectors were found. Other problems with demonstrated impact received more attention.

The PHP Foundation’s account.

With this in mind, saying that “these vulnerabilities were known and dismissed” oversimplifies the story.

When fixing a problem also means accepting tisks

The absence of a demonstrated attack coincided with another obstacle: fixing the problem required changes to the language’s core mechanisms.

That meant the proposed solutions came with significant costs: incompatibilities, new possibilities for denial of service, or changes that would be difficult to coordinate across third-party extensions. The PHP Foundation acknowledges that a lack of specialized resources and difficulties reaching consensus caused the work to stall. It describes the delay as a structural failure.

The Foundation’s explanation.

This context matters because the decision was not simply about ignoring an obvious flaw; it also involved weighing that flaw against the risks of modifying widely used infrastructure.

AI changes one side of that comparison: the effort required to demonstrate the danger.

The flaw was not new: the cost of analysis kept it hidden

In 2026, researchers managed to turn those failure patterns into working attacks.

Calif dates the start of its audit to July 30 and its first report to PHP to August 11. Its research revisited historical precedents to guide the analysis, then generalized the pattern it found to search for other variants. The researcher’s expertise helped frame the questions the agents needed to explore.

Calif’s timeline and methodology.

Wiz describes the other crucial aspect: building an attack required chaining flaws together and adapting to differences in memory layouts across applications, versions, and configurations. The models helped analyze errors, test adjustments, and adapt exploit chains. According to the team, that assistance made it possible to develop and adapt working attacks against several applications within hours.

Wiz’s research.

The change affects a particularly costly task. Finding a memory flaw may be just the beginning; proving that it allows code execution requires overcoming many intermediate conditions. AI can substantially reduce the work involved in navigating them, testing hypotheses, and repeating attempts.

That does not mean every old flaw is now trivial to exploit. But PHP2Shell does provide a documented example of how a substantial technical barrier can become less effective.

The timeline that should change our deadlines

Put in order, the PHP2Shell sequence is the strongest argument available today against quarterly patch planning:

  • October 17: an exploitation attempt reaches Amazon’s honeypots, four days before public patches are available. Amazon has been unable to determine how the attacker obtained the information.
  • October 21: patched versions and the disclosure are published. The CVSS v4.0 score is 9.2, with unauthenticated remote code execution, as confirmed by CERT-EU.
  • October 21–22: proofs of concept appear and automated activity begins. Cloudflare deploys mitigations and observes attackers modifying payloads to evade them; its CEO reports millions of exploitation attempts.
  • During the same period: governments across Europe, Australia, and the United Kingdom issue advisories calling for immediate updates. The U.S. National Security Agency warns that the flaw often opens “a direct path to the server’s file system or database” and recommends disconnecting systems if they cannot be patched immediately. Some government portals and Wikipedia temporarily disabled systems as a precaution, according to El País.

An important detail: millions of attempts do not mean millions of compromised systems. A single server can receive thousands of requests; many target machines that have already been updated or have configurations that cannot be exploited. As of October 23, public sources had not confirmed a wave of successful remote code execution attacks. The severity lies not in the confirmed impact, but in the speed imbalance between attackers and those applying patches.

What we need to change in our response

Our interpretation of PHP2Shell is that AI is changing the value of certain defenses. An attack that previously required an enormous investment of time and expertise may become feasible when exploration and adaptation accelerate. This shift means visibility into the dependency inventory can no longer be a background initiative; it is the security control with the highest return per euro invested.

Once a vulnerability emerges and we need to check whether we are affected, three specific capabilities make the difference:

  • An inventory of what runs, not just what is in the repository. The lockfile tells us what we declare; it does not tell us what is running in the deployment from three months ago that uses an old base image. We need to be able to query the runtime version in production.
  • Answers in minutes, not days. The question should be answered by querying the inventory, not by sending a round of emails or chat messages to five teams.
  • Automated patch testing in staging. If testing a runtime update requires a manually configured environment, the patch will not arrive in time.

The lesson we take away is that a company cannot compete with the speed at which a patch can be analyzed to produce an exploit. It can compete across the rest of the chain: knowing within minutes which versions are running, having tested updates, preauthorizing security deployments, and rehearsing how to disconnect a critical service so that nobody has to discover the procedure during an incident.

If this sounds familiar and you want to bring this security chain under control and automate it, get in touch with us. We review the state of your development lifecycle with you and help automate the critical steps to protect your systems faster. The defensive window does not widen by urging calm; it widens by automating the parts within our control.