PHP2Shell: How AI Helped Uncover Critical Vulnerabilities

When AI Changes the Rules of Vulnerability Research

What happens when a vulnerability that has existed for more than a decade becomes practically exploitable because Artificial Intelligence(AI) helps researchers overcome its technical complexity?

That is the question behind PHP2Shell, one of the major cybersecurity stories of October 2026.

On October 21, 2026 researchers publicly disclosed two critical vulnerabilities in PHP, the server-side programming language used by a vast number of websites. Tracked as CVE-2026-109618 and CVE-2026-109619, these flaws can enable unauthenticated remote code execution under vulnerable conditions. Successful exploitation could allow attackers to execute commands on a server without first logging in.

But the story goes beyond another critical vulnerability and an urgent security patch. AI models played a significant role in the research, helping uncover weaknesses and making the complex process of developing and adapting exploits more practical.

What Is PHP2Shell?

PHP2Shell is the name associated with a set of critical vulnerabilities in PHP's core engine. The vulnerabilities affect the underlying PHP runtime rather than being limited to a specific website, plugin or content management system.

This distinction matters.

Many security incidents begin with a vulnerability in an application, such as an outdated WordPress plugin. PHP2Shell is different because the underlying problem exists in PHP itself. Consequently, applications running on affected PHP versions may be vulnerable even when their own application code does not contain the flaw.

Researchers demonstrated remote code execution against environments running WordPress, Drupal and Joomla. These are examples of affected environments, not the only potential targets.

The two publicly identified vulnerabilities are:

  • CVE-2026-109618: Associated with memory corruption involving PHP's upload-progress handling and unserialization.

  • CVE-2026-109619: Associated with a use-after-free issue involving fatal-error backtrace handling.

Both involve memory-safety problems that can arise when PHP handles certain error conditions and subsequently reuses invalid or stale internal state.

Depending on the circumstances, the consequences include disclosure of sensitive process memory or remote code execution. Memory disclosure can expose information such as credentials, tokens and API keys held in process memory.

Where Does AI Enter the Picture?

AI did not create the PHP vulnerabilities. Instead, it helped researchers investigate the code, identify weaknesses and overcome some of the technical challenges involved in demonstrating their exploitability.

According to the published research, the vulnerabilities involved complex memory behavior and interactions between multiple bugs. Developing a reliable exploit required more than identifying a suspicious line of code.

Researchers needed to understand how PHP managed memory, how internal state changed following errors, and how those conditions could be combined to produce a security impact.

This is where frontier AI models became valuable.

Why Is This Vulnerability So Serious?

The severity of PHP2Shell comes from the combination of the underlying vulnerability, the potential impact of exploitation and the widespread use of PHP.

It affects the runtime, not just one application

When a vulnerability exists in an application's business logic, remediation may involve updating that application or its affected component.

A vulnerability in the language runtime can have a broader reach. Organizations may operate multiple applications, websites, containers and third-party products that depend on PHP.

A website owner may not even know that a vendor appliance or hosting component includes an affected PHP runtime.

The attack window can shrink rapidly

Another concern is how quickly attackers can act after vulnerability details become available.

On October 21, AWS reported observing PHP2Shell exploitation attempts in its MadPot honeypot telemetry dating back to October 17, before public disclosure. AWS subsequently observed further attempts following disclosure and the publication of proof-of-concept exploits.

This does not establish that every attempt succeeded, nor does it prove how the earlier actor obtained the relevant information. It does demonstrate why organizations cannot assume that the public disclosure date marks the beginning of all exploitation activity.

The Double-Edged Sword of AI in Cybersecurity

PHP2Shell highlights a fundamental challenge: the same technology can support both offensive and defensive security work.

AI-assisted capabilityPotential benefitPotential risk
Code analysisDiscover hidden vulnerabilitiesIdentify weaknesses in widely deployed software
Debugging and testingValidate fixes and reproduce bugsRefine exploit techniques
Variant discoveryFind related flaws before attackers doExpand the number of exploitable weaknesses
Security automationScale detection and remediationScale reconnaissance and exploit adaptation
Technical reasoningHelp more researchers investigate complex codeLower the expertise barrier for malicious actors

AI can reduce the effort needed to move from a theoretical weakness to a practical demonstration. That does not mean exploitation is effortless or guaranteed, but it changes how defenders should assess risk.

What Should Security Teams Do Now?

For organizations operating PHP applications, understanding the AI angle is useful, but remediation should come first.

  • Identify every affected PHP runtime
  • Apply the official security updates
  • Investigate potential compromise
  • Strengthen behavioral detection
  • Reduce the impact of future vulnerabilities

Flow diagram showing how a crafted request exploits PHP core flaws to reach remote code execution and credential exposure.”


What PHP2Shell Means for the Future of AI Security

The most important lesson from PHP2Shell extends beyond PHP and web application security.

  • Security research must become more continuous: Development teams should combine code review, automated security testing, dependency analysis and targeted manual assessments throughout the software lifecycle.
  • Patch management must become more responsive: Organizations need risk-based emergency procedures that account for active exploitation, exposure, business impact and the availability of a reliable fix.
  • AI itself needs security controls: The objective is to benefit from faster analysis without allowing an AI system to make unverified changes or execute potentially destructive actions.
  • Secure software foundations matter more than ever: AI can help identify flaws in legacy software, but repeatedly finding and patching individual vulnerabilities is not the only long-term answer.

AI Is Changing What Is Practically Exploitable

PHP2Shell is a clear example of how AI is changing vulnerability research. The vulnerabilities existed in PHP for years, but advanced AI capabilities helped researchers overcome some of the complexity involved in discovering, demonstrating and adapting exploits.

The same development creates urgency for defenders. AI can improve security analysis and accelerate fixes, but it can also reduce the time and specialist effort required to exploit vulnerable systems.

The right response is not to fear AI or assume it will solve cybersecurity. PHP2Shell is a reminder that, in the AI era, the time between discovering a weakness and exploiting it may become one of the most important variables in cybersecurity.


References

  1. Wiz Research: PHP2Shell: AI uncovers critical RCE vulnerabilities

  2. OpenAI - Patch the Planet: Global response coordination

  3. AWS Security Blog - PHP2Shell exploitation observed before public disclosure

  4. UK National Cyber Security Centre - Critical security issue affecting PHP

This article is for security awareness and defensive guidance. Check official PHP and vendor advisories for the latest remediation instructions.

Comments