
Exploit chain for WordPress Core using REST API route-confusion and SQL injection for unauthenticated RCE, privilege escalation, and full server takeover.
WP2Shell is a critical exploit chain in WordPress Core source code that allows a remote unauthenticated attacker to gain full control of the server (Full Server Takeover / RCE).
The exploit chain combines two security vulnerabilities:
WP_Query): Improper input sanitization for the author__not_in parameter in WP_Query, leading to SQL Injection.By chaining these two vulnerabilities, an attacker can send crafted HTTP requests to /wp-json/batch/v1, bypass authentication mechanisms, and trigger SQLi to escalate privileges, spawn a shell, and execute arbitrary code remotely (RCE).
A video recording the entire reproduction and real-world exploitation process is stored on Google Drive:
🔗 Link to view / download the PoC video: Google Drive - Video Demo WP2Shell PoC
The entire technical analysis flow, step-by-step PoC reproduction, and source code explanation are hosted on Notion:
🔗 Notion article link: WP2Shell CVE PoC Flow (Notion Writeup)
flowchart TD
A["[Attacker] Unauthenticated Remote Request"] --> B["REST API Batch Endpoint (/wp-json/batch/v1)"]
B --> C["CVE-2026-63030: Batch Route Confusion\n(Bypass Route Validation & Access Control)"]
C --> D["CVE-2026-60137: SQL Injection\n(Unsanitized 'author__not_in' in WP_Query)"]
D --> E["Database Manipulation / Privilege Escalation\n(Admin session / User creation)"]
E --> F["Web Shell Upload / Execution"]
F --> G["💥 Full Server Takeover (RCE)"]/wp-json/batch/v1 endpoint from unauthenticated users if an immediate update is not possible./wp-json/batch/v1.wp-content/uploads/ and wp-content/plugins/ directories to detect web shells or suspicious files.[!WARNING] This PoC documentation and source code are intended solely for security research, education, and system defense. The author assumes no responsibility for any unauthorized use of the information or tools in this repository to attack systems for which you do not have legitimate authorization.
| Property | Details |
|---|
| Chain Name | WP2Shell |
| CVE IDs | CVE-2026-63030 & CVE-2026-60137 |
| Severity | Critical (CVSS v3.1: 9.8 / 10.0) |
| Attack Vector | Network (Unauthenticated Remote) |
| Affected Versions | • Full RCE Chain: WordPress 6.9.0 - 6.9.4 & 7.0.0 - 7.0.1• SQL Injection Only: WordPress 6.8.0 - 6.8.5 |
| Patched Versions | WordPress 6.8.6, 6.9.5, 7.0.2 |