You updated WordPress after hearing about a critical unauthenticated RCE chain targeting the REST API batch endpoint. The dashboard says you are on the latest version. But did the patch actually close the hole? WordPress auto-updates sometimes fail silently, and managed hosting platforms do not all push core security releases at the same speed. A quick curl POST against your own site can confirm whether the vulnerability is neutralized or still wide open.
What the batch endpoint does and why it matters
WordPress ships a REST API batch processor at /wp-json/batch/v1. Its job is straightforward: accept a single HTTP POST containing multiple sub-requests, dispatch each one internally, and return all the responses in one round trip. This exists so the block editor (Gutenberg) and other clients can save several resources — posts, meta, settings — without firing dozens of individual HTTP calls.
When a batch request arrives, WordPress iterates over the array of sub-requests, matches each one to a registered REST route, runs permission checks and schema validation for that route, then calls the route's callback. At least, that is how it is supposed to work.
How the validation desynchronization works
The vulnerability tracked as CVE-2026-63030 and CVE-2026-60137 (sometimes called "wp2shell" or "batch-route confusion") exploits a gap between two steps in that dispatch process:
- Route matching and validation — WordPress looks at the
pathfield in a sub-request, finds the matching registered route, and validates the request body against that route's schema. - Callback dispatch — WordPress calls the callback function associated with the matched route.
The flaw: an attacker could craft a sub-request where the path used for validation resolved to one route (a benign, publicly accessible one), but the callback that actually executed belonged to a different, more privileged route. The validation step checked permissions and sanitized input against Route A, then the dispatch step handed the (now "validated") request to Route B's callback — which expected its own permission check to have already run.
This is a classic time-of-check-to-time-of-use (TOCTOU) pattern, but at the application routing layer rather than the filesystem. The allow_batch property on route registration was also bypassed: routes that explicitly opted out of batch processing could still be reached through the confused dispatch.
The result: an unauthenticated remote attacker could reach callbacks that should require administrator privileges, and because input sanitization was done against the wrong schema, they could pass payloads the target callback never expected. Combined with certain core callbacks that write to the filesystem or modify options, this produced a full remote code execution chain — no login required.
Patchstack documented attackers weaponizing this within roughly ninety minutes of public disclosure. Automated scanners began probing /wp-json/batch/v1 at scale almost immediately.
What the patch changes
The fix, shipped in WordPress 6.8.6, 6.9.5, and 7.0.2, ties the validation and dispatch steps together so the route matched during validation is the same route whose callback executes. The patch also enforces allow_batch checks at dispatch time, not just at the schema-matching phase. After the update, a sub-request that tries to confuse the router gets rejected before any callback runs.
Verify with a curl POST test
The idea: send a batch POST that mimics the structure an exploit would use, and check whether WordPress rejects it. You are not sending a real exploit payload — you are sending a structurally suspicious batch request and observing whether the server processes it or blocks it.
Replace https://your-site.example.com with your actual domain:
curl -s -o /dev/null -w '%{http_code}' \\
-X POST \\
-H 'Content-Type: application/json' \\
-d '{"requests":[{"path":"/wp/v2/posts","method":"POST","body":{"title":"batch-test","status":"draft"}}]}' \\
'https://your-site.example.com/wp-json/batch/v1'
This sends a batch containing one sub-request: a POST to /wp/v2/posts attempting to create a draft post. On a patched site, this sub-request requires authentication. The batch endpoint should not let it through without credentials.
Interpreting the HTTP status code:
- 401 or 403 — Good. WordPress rejected the unauthenticated batch sub-request at the permission check. The patch is working.
- 200 with error bodies — Likely fine, but inspect the response body to confirm. A 200 from the batch endpoint itself is normal (it wraps sub-responses), but each sub-response inside should show a
rest_cannot_createorrest_forbiddenerror code. - 200 with a created post — Bad. The sub-request executed without authentication. Your site is still vulnerable.
To see the full response body instead of just the status code:
curl -s -X POST \\
-H 'Content-Type: application/json' \\
-d '{"requests":[{"path":"/wp/v2/posts","method":"POST","body":{"title":"batch-test","status":"draft"}}]}' \\
'https://your-site.example.com/wp-json/batch/v1' | python3 -m json.tool
Sample output format on a patched site:
{
"responses": [
{
"status": 401,
"body": {
"code": "rest_cannot_create",
"message": "Sorry, you are not allowed to create posts as this user.",
"data": {
"status": 401
}
}
}
]
}
If you see a status of 201 inside the responses array and a post body with an ID, the sub-request succeeded without authentication. That means either the update did not apply or something else is wrong.
What to do if the test shows you are still vulnerable
First, confirm your actual running WordPress version. SSH into the server and check:
grep '\\$wp_version' /path/to/wordpress/wp-includes/version.php
If the version is below 6.8.6 (for the 6.8.x branch), 6.9.5 (for 6.9.x), or 7.0.2 (for 7.0.x), the update did not land. Common reasons: auto-update was disabled in wp-config.php, a file permission issue prevented the updater from writing, or a managed host has not pushed the release yet.
Update manually through WP-CLI if available (wp core update), or download the release from wordpress.org and replace the core files. Then run the curl test again.
If the version string shows a patched release but the test still succeeds, check whether a caching layer (Varnish, Nginx FastCGI cache, a CDN) is serving a stale response or bypassing WordPress entirely for POST requests — that would be unusual but worth ruling out. Also check whether a security plugin is overriding REST API behavior in a way that re-introduces the flaw.
If your site was running a vulnerable version during the window between public disclosure and your update, review your access logs for POST requests to /wp-json/batch/v1 from unfamiliar IPs. Look for new administrator accounts, unexpected files in wp-content/uploads or the web root, and modified core files. The WordPress upgrade directory exploitation check covers post-compromise indicators in more detail.
Why checking the version number alone is not enough
Support engineers see this pattern regularly: a customer reports they updated, the dashboard shows the right version, but the actual files on disk are a mix of old and new. Partial updates happen. File-level verification (wp core verify-checksums via WP-CLI) catches corrupted or incomplete updates, but it does not tell you whether the specific security logic is active at runtime. The curl test does — it exercises the exact code path the attacker would use and shows you the result.
Make it a habit: after any security update, do not just check the version. Hit the endpoint. Read the response. That is the only proof that matters.