Cybersecurity Research

WP2Shell: How Two Old WordPress Fixes Combined into an Unauthenticated Remote Code Execution Chain

Hacktron · 19 July 2026
Key Takeaway Make sure WordPress core is set to update automatically and confirm your sites are on a patched release as soon as one is available.

WordPress powers around half of all websites, roughly 500 million sites, so a pre-authentication remote code execution (RCE) flaw found by Searchlight Cyber matters widely. Any site running an affected version can be attacked without logging in and with no special preconditions. The chain, dubbed WP2Shell, combines CVE-2026-63030, a route handler confusion issue in the REST API batch endpoint, and CVE-2026-60137, an SQL injection in WordPress core.

Hacktron's analysis shows how each flaw arose. The batch endpoint bundles several API calls into one request. When a malformed sub-request was encountered, a fix for a bug (ticket #63502) added an error entry to the validation list but skipped adding a matching entry to the handler list. The lists drifted out of step, so a sub-request could be validated against one route's schema but run by a different route's handler. That lets an attacker slip unvalidated data through, including a nested request the endpoint would normally reject.

The second flaw came from a change to improve cache key generation in WP_Query (ticket #59516). After the change, the author__not_in parameter was only sanitized when it was an array. A string passed through unchanged and reached an SQL query. On its own, this would not affect a default site unless a plugin or theme supplied untrusted input to that parameter. The batch flaw supplies exactly that path from WordPress core itself.

Hacktron then recreated both original pull requests and ran its review tool against them. It flagged the index misalignment on the exact lines that introduced the bug, though it misdescribed the impact: the schema validation is bypassed, not the permission checks. Hacktron says it has reproduced the RCE but is withholding the proof of concept until the chain is widely known and actively exploited.

Why it matters

Every default WordPress site is exposed, because core supplies both the validation bypass and the injectable parameter, so the usual comfort that a bug needs a vulnerable plugin does not apply. Neither flaw looked dangerous alone: the SQL injection needed a way to feed it strings, and the routing bug looked like a stability fix. Teams must assess bugs as chains, and cannot assume that a low-impact finding stays low-impact.

What to do

  • Check every WordPress site you run against the affected version list published by Searchlight Cyber and apply the patched release.
  • Enable automatic core updates where possible.
  • Review web logs for unusual POST requests to /wp-json/batch/v1, especially with nested sub-requests.
  • Review logs for requests to /wp/v2/posts containing the author_exclude parameter.
WordPress RCE SQL injection CVE-2026-63030 CVE-2026-60137 code review

Summarised by CISO AI from Hacktron, written with Claude Sonnet 5.5. We link back to every original so you can read it yourself.