WP2Shell (CVE-2026–63030): The WordPress Core Bug That Let Anyo
A route-confusion bug in the WordPress REST API batch endpoint let an unauthenticated attacker bypass permission checks, and a second SQL injection bug in WP_Query allowed forged post objects to be written to the database. The chain could create an administrator account and then upload a plugin containing a web shell, giving remote code execution.
Published on medium.com
On July 17, 2026, a security researcher named Adam Kues (from Searchlight Cyber’s Assetnote team) publicly disclosed a vulnerability chain nicknamed wp2shell.
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 failure to keep the batch request list and handler list aligned after a malformed sub-request, combined with missing sanitisation of a string value in WP_Query.
Impact
An unauthenticated attacker could create an administrator account and then upload a plugin containing a web shell, achieving remote code execution on the server.
What the attacker needed
No authentication; no user interaction; default WordPress install
The fix
WordPress released emergency patches and forced automatic updates; sites should update to 7.0.2, 6.9.5 or 6.8.6.
How it was found
- Send a batch request to the batch endpoint containing a deliberately malformed sub-request.
- Include a sub-request that reaches the posts endpoint without schema validation and passes a raw string for the author exclusion parameter.
- Use the SQL injection to return forged post rows that become cached objects with attacker-chosen status, type and parent.
- Trigger oEmbed to re-save the forged post, writing the fake fields into the database.
- Create a parent loop so WordPress performs nested saves, and forge a customizer changeset pointing to a real administrator.
- Re-process the user creation sub-request while the admin identity is active, then log in and upload a plugin containing a web shell.
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 website engine. A bug in how it handled grouped API requests let an outsider skip the login check, and another bug let them slip database commands into a query. Together they let the outsider make an admin account and then run their own code on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.