PHP2Shell: AI Uncovers Critical RCE Vulnerabilities in the PHP Engine
PHP2Shell: What happened?
On October 21, 2026 Wiz Research (owned by Alphabet) published details of PHP2Shell. The finding is a collection of critical vulnerabilities inside the PHP engine itself. The flaws allow unauthenticated remote code execution and sensitive memory disclosure on servers that run vulnerable PHP versions.
The difference from a typical CMS bug is that the problem lives in PHP, not in WordPress, Drupal, Joomla or your own application code. If the server runs an affected PHP version the platform is exposed no matter how hard you harden the application layer.
Wiz rates the severity at CVSS 9.2 and notes the bugs date back to PHP 5.4, more than a decade of possible exposure. PHP released security updates the same day as the public disclosure.
Why PHP2Shell Is Dangerous
| Characteristic | Impact |
|---|---|
| Unauthenticated exploitation | No login, no compromised account needed. An attacker can hit a public endpoint directly. |
| Core engine vulnerability | The flaw sits in PHP internals such as memory management, fatal error handling and OPcache. Hardening the application does not fix it. |
| Remote code execution | Successful exploitation gives arbitrary code execution on the server. |
| Memory disclosure | Attackers can pull PHP worker memory that may contain passwords, API keys, tokens, certificates and other secrets. |
| Broad reach | PHP powers a massive portion of the web including WordPress, Drupal, Joomla, MediaWiki and countless custom apps. Wiz demonstrated working RCE exploits against WordPress, Drupal and Joomla plus a separate memory‑disclosure technique. |
The demonstrations prove the underlying PHP flaws are exploitable. They do not mean every WordPress, Drupal or Joomla installation has been compromised. Actual exposure depends on PHP version, configuration and whether vendor patches are applied.
How the Vulnerabilities Work (High Level)
The root cause is memory‑safety problems in how PHP handles fatal errors and out‑of‑memory conditions.
Simplified flow:
- PHP hits a fatal allocation failure while processing a request.
- The request ends but internal state still points to memory that has been freed.
- A later request handled by the same worker touches that stale state.
- Under the right conditions an attacker turns the resulting memory corruption or disclosure into an exploit.
Wiz groups the issues under two CVEs:
| CVE | Main Issue | Demonstrated Impact |
|---|---|---|
| CVE-2026-109618 | OOM handling and use‑after‑free in upload‑progress processing | Unauthenticated RCE on WordPress, Drupal, Joomla; remote process‑memory disclosure |
| CVE-2026-109619 | Stale fatal‑error backtrace state and OPcache type confusion | Unauthenticated RCE on Drupal and WordPress |
Wiz describes four exploit primitives across these CVEs and warns more variants may exist. The PHP patches fix the underlying root causes rather than only blocking the demonstrated chains.
The AI Factor: Why This Matters Beyond the Patch
One of the most significant aspects of PHP2Shell is how it was discovered.
- The underlying flaws existed for over a decade. They were hard to exploit reliably — doing so required deep expertise in PHP memory management and internal architecture.
- AI changed the economics. Wiz used Wiz Atlas, Gemini 4 Argon and GPT‑5.6 Sol during research. The team credits Gemini 4 Argon with a particularly large contribution across vulnerability discovery, exploit development, detection and patch validation.
- AI accelerated exploit adaptation. Researchers used it together with testing and debugging tools to adjust techniques for different PHP versions, configurations and memory layouts.
- Double‑edged sword: AI helps defenders find long‑standing bugs, but it also lowers the specialist expertise and effort attackers need to weaponize them.
Wiz argues that AI changes the practical threat posed by vulnerabilities that once seemed too difficult or expensive to exploit reliably. Complexity is no longer a reliable shield.
Remediation and Mitigation
1. Update PHP Immediately (Primary Response)
| Branch | Fixed Version |
|---|---|
| PHP 8.5 | 8.5.12 |
| PHP 8.4 | 8.4.27 |
| PHP 8.3 | 8.3.36 |
| PHP 8.2 | 8.2.35 |
- Linux distribution packages: check for vendor updates and security backports.
- PHP 8.1 and older no longer receive ordinary upstream security updates. Prioritize migration or vendor extended support.
2. Temporary Mitigations (If Patching Is Delayed)
The PHP advisory recommends measures that reduce exposure to specific attack paths:
- Disable session upload‑progress handling.
- Review memory limits, request‑size limits and fatal‑error handling.
These are partial mitigations, not a substitute for a security update.
3. Investigation Signals
Wiz highlights the following as potential indicators of exploitation attempts:
- Unusual multipart HTTP requests followed by memory‑limit errors or repeated HTTP 500 responses.
- Unexpectedly large or malformed PHPSESSID cookies.
- Unexplained PHP worker churn.
These indicators are not proof of exploitation on their own; they warrant investigation.
Coordinated Industry Response
Wiz coordinated disclosure with the PHP security team and major infrastructure players:
OpenAI, Google Cloud, Cloudflare, AWS, Microsoft, Automattic, Fastly, Akamai, Imperva, Vercel
The collaboration covered coordinated disclosure, patch verification, detection rules and mitigations for organizations unable to update immediately. This illustrates the difficulty of addressing a vulnerability in widely deployed infrastructure. The response spans hosting providers, cloud platforms, application operators and software maintainers.
Disclosure Timeline
| Date | Event |
|---|---|
| August 19, 2026 | Initial vulnerability discovery |
| August 20–21, 2026 | RCE confirmed against Drupal and WordPress |
| August 24, 2026 | Vulnerabilities reported to PHP security team |
| September 21, 2026 | PHP acknowledged reports and began developing a fix |
| October 21, 2026 | Security patches released and public disclosure |
Source: Wiz PHP2Shell report.
The Broader Lesson
PHP2Shell is not just another critical PHP vulnerability. It sits at the intersection of:
- Widely deployed infrastructure software (PHP powers a huge fraction of the web).
- Long‑lived memory‑safety flaws (over a decade in the codebase).
- AI‑assisted exploit development (dramatically lowering the effort to weaponize).
For defenders: AI is a powerful tool to uncover old weaknesses in your own stack. Use it.
For everyone: The era where exploit complexity bought time is ending. When a memory‑safety bug in a core component can be reliably weaponized with AI assistance, patching speed and defense‑in‑depth become even more critical.
References
- Wiz Research full technical report: https://www.wiz.io/blog/php2shell-ai-uncovers-critical-rce-vulnerabilities
- Official PHP security announcement: https://www.php.net/security
Read Next.
Node2Shell: Brotli Decoder Bug in Node.js Enables Remote Code Execution (CVE-2026-111497)
Node.js October 2026 security releases fix CVE-2026-111497, a High-severity Brotli decoder vulnerability. Imperva's Node2Shell research demonstrates remote code execution on a stock Node.js 24.22.0 ARM64 build. Affected versions: 22.x, 24.x, 26.x.
Copy Fail: Page Cache Corruption in the Linux Kernel (CVE-2026-31431)
CVE-2026-31431, dubbed 'Copy Fail,' allows local attackers to gain root privileges by corrupting the Linux page cache via the algif_aead crypto interface. This article breaks down the technical root cause and the exploitation timeline.
Dirty Frag: Memory Corruption in the Linux IPv6 Stack (CVE-2026-43500)
Dirty Frag represents a dual-CVE vulnerability in the Linux kernel network stack. By exploiting a race condition in IPv6 fragment reassembly, attackers can achieve kernel-mode heap corruption and local privilege escalation.


