wp2shell Technical Analysis
A pre-authentication remote code execution chain in WordPress core combines a route confusion flaw in the REST API batch endpoint with a SQL injection, allowing an unauthenticated attacker to execute code on a default installation.
medium.com
Published on medium.com
wp2shell(WP2SHELL) — the name given to a critical WordPress vulnerability disclosed in July 2026.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a route confusion flaw in the REST API batch endpoint that allows bypassing intended request handling and reaching a SQL injection in WordPress core.
Impact
An unauthenticated attacker could achieve full remote code execution and complete compromise of the website and its underlying data, though Cloudflare noted the vulnerable code path requires that a persistent object cache is not in use.
What the attacker needed
WordPress 6.9.0-6.9.4 or 7.0.0-7.0.1; No persistent object cache in use; No authentication required
The fix
The issue was fixed in WordPress 6.9.5, 7.0.2 and 7.1 Beta 2; if updating is not possible, block anonymous access to the batch API.
How it was found
- Send crafted requests to the WordPress REST API batch endpoint.
- Exploit a route confusion flaw to bypass intended request handling.
- Reach a vulnerable SQL injection in WordPress core.
- Gain code execution on vulnerable, unpatched installations.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
WordPress is a popular tool for building websites. This flaw lets someone who has not logged in send special requests to a part of WordPress that handles multiple actions at once, tricking it into running harmful database commands and then taking over the site. No account or user action is needed.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.