Vibeleaderboard
← All Intel
Intel / article

PHP2Shell: AI uncovers critical RCE in PHP

Source
wiz.io
Publisher
Wiz
Author
danlark1
Date

Context

PHP2Shell is Wiz Research's name for a set of memory-safety bugs in core PHP, grouped under CVE-2026-109618 and CVE-2026-109619, with severity reaching CVSS 9.2. The bugs are in the PHP engine rather than in any , so Wiz says even a simple Hello World app on an affected version can be vulnerable, and that every PHP version released in the last decade, back to 5.4, has at least one of them. The 70% in Wiz's headline is its figure for the share of websites that run on PHP. PHP released patched versions on October 21, the same day as disclosure, and Wiz calls applying that update the only complete remediation.

The shared pattern is about what PHP leaves behind when a request dies. If an out-of-memory error aborts a request at the wrong moment, PHP can destroy the request's memory while a global pointer still refers to it. A later request handled by the same worker then trusts that stale pointer. In one variant, PHP encodes the reused memory into a PHPSESSID cookie sent back to the attacker, leaking data from other requests such as passwords, and keys, even when the application never starts a . Other variants corrupt memory, and one confuses types in OPcache's shared memory across workers. Wiz combined them into a script that achieved unauthenticated remote code execution against the latest WordPress, Drupal and Joomla container images, and says other variants exist that the patch also fixes at the root.

Wiz's argument for the AI framing is that the code had been there for over a decade, and making it exploitable meant chaining bugs and adapting to each target's memory layout through repeated testing. It says it used Wiz Atlas, GPT-5.6 Sol from OpenAI and Gemini 4 Argon from Google DeepMind, crediting Argon in particular with finding the bug, building exploits and validating the patch, and that one researcher did in a week what would have taken a world-class team months. That is Wiz's own estimate, not a measured comparison. For servers that cannot be patched right away, Wiz lists hunting signals such as unusual multipart requests followed by memory-limit errors or repeated HTTP 500 responses and oversized or malformed PHPSESSID cookies, and says vendors including Cloudflare prepared mitigations. Cloudflare's version, which inspects the origin's response as well as the request, launched the same day.

Terms in this piece · Glossary
  • Application — Software arranged so that a person can use it; in this course, the software around a model that accepts your request, prepares the context and shows the reply.
  • Token — A piece of text, such as a word, part of a word or a punctuation mark, that a language model represents as numbers and handles as a unit.
  • API — Application programming interface: the agreed set of operations, inputs and outputs through which one piece of software uses another.
  • Session — One conversation or piece of work as a harness keeps it: a record of messages, tool calls and observations that can be saved and resumed.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Recommended reads