
A critical PHP flaw gives attackers code execution and a read of worker memory, and a growing share of the tools your agents call runs on PHP, from the WordPress MCP Adapter to Laravel MCP. We cover where agents touch PHP, how to tell if yours do, and the control that holds when a trusted tool server turns hostile.

PHP2Shell is a flaw in PHP's own engine, so every application on an affected version is exposed, down to a bare "Hello World". When a request runs out of memory partway through startup, PHP leaves stale internal state behind, and the next request on the same worker reuses it. One chain turns that into unauthenticated remote code execution. Another returns an attacker-sized slice of worker memory inside a PHPSESSID cookie, memory that Wiz says may hold passwords, authentication tokens, API keys and certificates from other requests. Wiz demonstrated RCE against WordPress, Drupal and Joomla, and Calif extended the list to Magento, Laravel, Symfony and others. Details leaked a day early, and several vendors were reporting exploitation attempts before the fixes shipped, none confirmed successful at the time of writing.
Update to a fixed version, or take your vendor's backport. For hosts that cannot move today, PHP lists partial mitigations (disabling session upload progress and fatal-error backtraces, lifting the memory limit) and says none of them makes an installation safe. A WAF with rules for the known vectors buys time. The web tier is only the first place this lands.
The mainstream harnesses rarely run on PHP. Claude Code, Codex, Cursor and their peers are built in TypeScript, Python and Rust. The PHP exposure for an agent program lives one hop away, in the servers the agents call and the credentials they carry to them.
Once an attacker lands on a PHP host, or merely reads its memory, the tokens the agents sent there are theirs, and so is the MCP server running on it. From that point, the tool descriptions and tool results every connected agent reads come from the attacker, carrying the server's name and the organization's trust, even though no prompt has been jailbroken and no harness exploited. The agent simply keeps following a tool it has always followed.
We see this layer every day across the environments we monitor: coding agents connected to a managed WordPress platform through its MCP server, with tools that run WP-CLI and pull environment configuration; a Laravel MCP server taking shape inside a product team's repository; agents holding WordPress application passwords so they can push pages over the REST API. This is what wiring an agent into a content stack looks like in 2026.
OpenAI shipped a version checker and two Codex skills for finding vulnerable hosts, and this is the week many teams will point coding agents at their fleets to patch at scale. Emergency work with sudo across many hosts is where an agent's wrong assumption does the most damage, as when a Cursor agent reached for a leftover broad-scope token and wiped a production database in seconds.
A footnote for the MCP crowd: the protocol's co-creator, David Soria Parra, was the release manager for PHP 5.4 and 5.5, and 5.4 is the oldest version PHP2Shell reaches.
Before the alerting, answer one question: which of your agents' tools sit on PHP? The inventory you already keep gets you most of the way.
- Trace each MCP server to the application behind it: The PHP-hosted ones are the WordPress MCP Adapter, the Drupal MCP Server, Laravel MCP and anything built on the official PHP SDK. A response-header check helps, though an MCP server often sits behind a Node or Go proxy, so it can confirm the application rather than the front door.
- Note the credential each agent hands those servers: The application passwords and bearer tokens agents send are what the memory-read variant skims, so that list doubles as your rotation list.
- Find out who patches the PHP: A managed platform such as WordPress VIP or Pantheon does it for you, so confirm the build. A self-hosted app is yours to patch today.
On the web tier, Wiz's signals are the ones to wire into alerting:
On the agent tier, look one hop out from those servers:
On this page
Section heading
Blocking a risky tool call stops the action, but it can also stop the work: in our survey of nearly 6,000 Claude Code sessions, a hard block left the rest of the request waiting for a person 75% of the time. Auto-steer holds only the risky call and reminds the agent what the user asked for, and 93% of agents finished the rest of the request with no one stepping in. In our attack simulation, steering got 90% of blocked sessions to finish the task and cut repeat blocked attempts from 48% to 10%. When steering stops helping, Auto-steer falls back to a hard stop.