wp2shell: An Unauthenticated RCE Chain in WordPress Core

The first question anyone asks about a WordPress vulnerability is which plugin, and whether they run it. For wp2shell that question gets you nowhere: the finders say it can be exploited by an anonymous user in a stock install with no plugins, and attacks are already running. If you have WordPress 6.9 or 7.0 anywhere, check the version before you read the rest.
| CVE-2026-63030 | CVE-2026-60137 | |
|---|---|---|
| Bug | REST API batch route confusion | SQL injection through author__not_in in WP_Query |
| Affected | 6.9.0 to 6.9.4, 7.0.0 to 7.0.1, 7.1 beta before beta2 | 6.8.0 to 6.8.5, 6.9.0 to 6.9.4, 7.0.0 to 7.0.1, 7.1 beta before beta2 |
| Fixed in | 6.9.5, 7.0.2, 7.1 beta2 | 6.8.6, 6.9.5, 7.0.2, 7.1 beta2 |
| Severity | 9.8 Critical from WPScan as CNA, 7.5 High from CISA-ADP | 5.9 Medium from WPScan as CNA, 9.1 Critical from CISA-ADP |
| Exploited as of 2026-07-22 | Yes, CISA KEV since 2026-07-21 | Yes, CISA KEV since 2026-07-21 |
| Disclosed | 2026-07-17 | 2026-07-17 |
How two bugs become a shell
The finders held off on publishing to give defenders time to upgrade, but within a day other researchers had read the patch and published the mechanism. What follows comes from the advisories, WordPress's own code, press accounts of that work and one captured attack.
CVE-2026-60137 is the older half. WP_Query does not properly sanitise author__not_in, which allows SQL injection "when a plugin or theme passes untrusted input to the parameter." WordPress's advisory calls it facilitated: core holds the flaw, but something else has to carry attacker input to it. On 6.8 that is still the whole story, because 6.8 is only affected by this bug.
CVE-2026-63030 is what changes that. It is a route confusion in the REST API batch endpoint, reported to have arrived in 6.9. CISA says the chain lets an unauthenticated attacker gain remote code execution on default installations. The Hacker News describes the mechanism: the batch route tracks sub-requests in two parallel arrays, an error in one knocks the arrays out of step by one, and a request then runs under a different request's handler. Nested, that gets past the endpoint's allow-list and puts an anonymous request's input into the vulnerable query, which is the input a plugin was otherwise needed for.
The public evidence of what changed is the 7.0.1 to 7.0.2 diff, which holds three July 17 code fixes: sub-requests must always use dispatch, ensure errors in batch requests propagate, and force author__not_in values to be integers. None names a CVE, so matching them to the bugs is my reading. The second adds one line to serve_batch_request_v1, $matches[] = $single_request;, which fits the parallel-array account. The first adds a guard whose comment reads: "Refuse to start a fresh top-level REST cycle while another dispatch is already in flight. Internal sub-requests must use dispatch()."
SANS ISC published a complete exploit request supplied by a reader. It is a POST to /?rest_route=/batch/v1 with nested requests arrays, malformed /// paths, and an inner GET on a posts route with SQL in author_exclude. WordPress's REST posts controller maps author_exclude to author__not_in, the parameter in CVE-2026-60137. A later UNION SELECT uses INTO OUTFILE to write a PHP webshell into wp-content/cache/, which is how SQL injection becomes code execution with no login. The shell answers 404 to requests without its secret parameter, and the attacker later added an admin user.
Fixes and forced updates came on July 17, and public exploits were on GitHub by July 18, along with what researchers called the first signs of in-the-wild exploitation.
Where the sources disagree
Preconditions. The finders say none. Cloudflare says the RCE works "when a persistent object cache is not in use". CISA says default installations. I would not count an object cache as a mitigation.
Path to code execution. BleepingComputer reported that some exploits extract password hashes, crack an admin password and upload a plugin, while others claim direct pre-auth RCE. The SANS capture shows the direct route. My inference, not stated by any source cited here, is that the file write needs a database allowed to write into a web-served path. Tight permissions may narrow that route, but not the password-hash one.
Severity labels. WordPress says one critical and one high. The GitHub advisories say Critical and Moderate. NVD shows WPScan's 9.8 and 5.9 alongside CISA-ADP's 7.5 and 9.1, so the two scorers rank the bugs in opposite order. Cloudflare's headline says two high-severity vulnerabilities, its opening says two critical, and its per-CVE ratings are High for CVE-2026-60137 and Critical for CVE-2026-63030.
What to do now
- Update. Go to 7.0.2 on 7.0.x, 6.9.5 on 6.9.x, 6.8.6 on 6.8.x, and 7.1 beta2 on the beta. WordPress says versions before 6.8 are not affected. The manual path is Dashboard > Updates > Update Now.
- Verify every instance. WordPress enabled forced updates, but treat that as help, not proof. Check running versions, and the images and repositories you deploy from, so the next deploy does not bring the old version back.
- If you cannot patch today, block the route. The finders' temporary mitigations keep anonymous callers off the batch API, either with a plugin that blocks anonymous REST access or with WAF rules. At a WAF, block both
/wp-json/batch/v1and?rest_route=/batch/v1, and expect some legitimate functions to break. Help Net Security's write-up calls these "emergency temporary measures" until you can update. - Assume compromise if you were exposed. A patch does not remove a shell. SANS advises checking
wp-content/cache/and recently created users. Look on disk, because the shell returns 404 to casual requests. - Search your logs. Look for POSTs to either batch route. The SQL sits in the JSON body, so logs without bodies show only the route. SANS says the attempts reaching its honeypots only test for the bug, but the same diary shows a reader's capture of a complete exploit. A hit alone does not tell you which it was, so check the disk and the user table.
CISA's KEV due dates are July 24 for CVE-2026-63030 and August 4 for CVE-2026-60137. Work to the first.
Two scorers, opposite order
CVE-2026-60137 carries two scores: WPScan's 5.9 (AC:H, C:H, no integrity impact) and CISA-ADP's 9.1 (AC:L, C:H, I:H). WPScan's 5.9 is one number for 6.8, where a plugin has to cooperate, and for 7.0, where CISA says the chain reaches default installations. I read that vector as describing the bug alone, and for the bug alone it is defensible. For the chain it understates: the SANS capture shows the SQL injection writing a file to disk, which is hard to square with no integrity impact. CISA's enrichment disagrees with WPScan on both complexity and integrity.
CVE-2026-63030 runs the other way: 9.8 from WPScan, 7.5 from CISA-ADP with no integrity impact. The 9.8 looks like the correction, but read the NVD text. It describes the confusion issue "combined with" the SQL injection. My reading is that the 9.8 is the chain's score, since WordPress credits Adam Kues with "A REST API batch-route confusion and SQL injection issue" as one report. None of the sources cited here says why it was scored this way. WordPress credits a separate team, TF1T, dtro and haongo, with the SQL injection alone. Nothing guarantees the next chain gets written up as one.
My position: severity belongs to a CVE, and reachability belongs to your deployment, which changes when you upgrade. On my reading of the chain, moving from 6.8 to 6.9 made a bug WPScan rates medium reachable by anyone. "Facilitated" is a condition, and conditions need rechecking, not filing. I made the case for ranking on more than CVSS in CVSS Is Not Risk, but KEV is no first alarm here: it arrived four days after the fix. For pre-auth bugs in core, the fix release is your trigger.
None of that works unless you know where WordPress runs, which is why the list comes first. That is the problem Dwaar works on: discovering what you ship from source control, registries and cloud accounts, scanning it, and putting the results in one findings list with EPSS and KEV signals.
Try this today. Pull your open medium findings with a network attack vector, read each description for a condition like this one, and write down what in your stack could satisfy it. Anything satisfied by an upgrade you already shipped moves to the top.
References
- WordPress.org, WordPress 7.0.2 Release, 2026-07-17
- NVD, CVE-2026-63030, published 2026-07-17
- NVD, CVE-2026-60137, published 2026-07-17
- CVE Program, CVE-2026-63030 record, as of 2026-07-22
- CVE Program, CVE-2026-60137 record, as of 2026-07-22
- WordPress (wordpress-develop), class-wp-rest-posts-controller.php, line 247, tag 6.8.0
- WordPress (wordpress-develop), compare 7.0.1...7.0.2, 2026-07-17
- WordPress (wordpress-develop), REST API: sub-requests must always use dispatch, 2026-07-17
- WordPress (wordpress-develop), REST API: Ensure errors in batch requests propogate, 2026-07-17
- WordPress (wordpress-develop), Query: Force author__not_in values to be integers, 2026-07-17
- GitHub Security Advisories (WordPress/wordpress-develop), GHSA-ff9f-jf42-662q, 2026-07-17
- GitHub Security Advisories (WordPress/wordpress-develop), GHSA-fpp7-x2x2-2mjf, 2026-07-17
- Cloudflare, Cloudflare WAF protects WordPress applications from two high-severity vulnerabilities, 2026-07-17
- The Hacker News, New wp2shell WordPress Core Flaw Lets Unauthenticated Attackers Run Code, 2026-07-17, updated 2026-07-18
- BleepingComputer, WordPress core wp2shell RCE flaws get public exploits, patch now, 2026-07-18
- Help Net Security, Two new high severity WordPress vulnerabilities, patch immediately!, 2026-07-18, updated 2026-07-21
- Security Affairs, Attackers Can Take Over WordPress Sites Using Newly Released wp2shell Exploits, 2026-07-19
- SANS Internet Storm Center, WordPress Exploitation Underway (CVE-2026-63030), 2026-07-20
- CISA, Known Exploited Vulnerabilities catalog, entries added 2026-07-21
