
Unauthenticated RCE in WordPress core (wp2shell), via SQL injection
WordPress core versions 6.9.0-6.9.4 and 7.0.0-7.0.1 (plus 7.1 beta) contained an unauthenticated remote code execution flaw stemming from REST API batch-route confusion at /wp-json/batch/v1 that chains into SQL injection, exploitable against a stock install with no plugins. WordPress shipped emergency fixes (6.9.5, 7.0.2, 7.1 beta2) and enabled forced auto-updates given the scale of exposure (500M+ WordPress sites); a separate SQLi patched in the same round affects 6.8.x, fixed in 6.8.6. Researcher Adam Kues (Searchlight Cyber) reported the flaw and released a checker tool at wp2shell.com; the post also covers interim mitigations (blocking the batch route via WAF/plugin) for sites that can't patch immediately.
What it is
An unauthenticated remote code execution flaw in WordPress core, patched in an emergency release on July 17. WordPress 7.0.2 fixes it (or 6.9.5 on the 6.9 branch). Adam Kues at Searchlight Cyber reported it; the vuln is dubbed wp2shell, with an exposure checker at wp2shell.com (which has been intermittently offline). It triggers against a stock install with no plugins, so the exposed population is large.
How it works
WordPress core's advisory describes it as a REST API batch-route confusion combined with SQL injection that chains into RCE. The entry point is the batch endpoint at /wp-json/batch/v1. An anonymous attacker escalates the injection into arbitrary code execution — no authentication required.
Preconditions / Affected
The RCE affects:
- WordPress 6.9.0–6.9.4 (fixed in 6.9.5)
- WordPress 7.0.0–7.0.1 (fixed in 7.0.2)
- WordPress 7.1 beta (fixed in 7.1 beta2)
Anything below 6.9.0 is not vulnerable to the RCE. Separately, WordPress 6.8 is exposed to a different SQL injection patched in the same round — 6.8 sites should move to 6.8.6. Versions before 6.8 are unaffected by either issue. WordPress.org has enabled forced auto-updates for affected sites given the severity.
What to do
Update immediately to 7.0.2 (or 6.9.5 on the 6.9 branch). Most sites with background updates will receive it automatically, but confirm the version in your dashboard rather than assuming. If you can't patch right away, the disclosure lists temporary measures:
- Install a plugin that blocks unauthenticated access to the REST API.
- At your WAF, block both the path
/wp-json/batch/v1and the query parameterrest_route=/batch/v1. - Add a small must-use plugin requiring authentication on the REST batch route.
Caveats
Each temporary measure can interfere with legitimate REST API traffic — treat them as short-term cover, not a substitute for patching. The wp2shell.com checker has been going offline occasionally. Note this is a vendor post: the article promotes Aikido Zen (embedded runtime firewall) as SQL-injection mitigation and Aikido Intel as a vuln feed, which frames the "if you can't patch" advice.
Organisations named here
- Adam Kues
Technologies named here
- WordPress Core
- Aikido Zen
- Aikido Intel
- wp2shell checker
- WordPress
- Searchlight Cyber
Threat actors named here
- wp2shell
Related in AppSec
Flowise MCP Security Bypass Enables RCE
Inside an Oracle Database SQL Injection Attack | Huntress
OASIS
