
Python PoC exploiting a WordPress pre-auth RCE chain (CVE-2026-63030 route confusion + CVE-2026-60137 SQLi) to create admins, dump users, and upload a webshell.
WordPress Pre-Authentication Remote Code Execution Chain
This script exploits a chain of two vulnerabilities in WordPress:
/wp-json/batch/v1 endpoint, allowing desynchronization of request validation.author__not_in parameter of the /wp/v2/posts REST API.When chained, an attacker can create a new administrator account without authentication, then upload a webshell through the WordPress theme editor.
CVSS v3.1: 9.8 (Critical)
Status: Added to CISA KEV Catalog (due date July 24, 2026)
Patched in: WordPress 6.9.5, 7.0.2, 6.8.6
| Version | Status |
|---|---|
| 6.8.0 – 6.8.5 | SQLi only (CVE-2026-60137) |
| 6.9.0 – 6.9.4 | Full RCE chain |
| 7.0.0 – 7.0.1 | Full RCE chain |
| 6.9.5, 7.0.2, 6.8.6 | Patched |
git clone https://github.com/Githu836/PoC-for-CVE-2026-63030
cd wp2shell
chmod +x wp2shell.py
Usage
python3 wp2shell.py --url https://target.com --check
Checks whether the target is vulnerable without performing exploitation.
python3 wp2shell.py --url https://target.com --dump-users
Extracts usernames and password hashes from the wp_users table via UNION SQL injection.
python3 wp2shell.py --url https://target.com --cmd "id"
Runs the full chain: create admin → upload webshell → execute command.
python3 wp2shell.py --url https://target.com --shell
Opens an interactive shell after the webshell is successfully uploaded.
python3 wp2shell.py --url https://target.com --shell --proxy http://127.0.0.1:8080
How It Works
Phase 1: Probe
The script checks the WordPress version from /readme.html or a JavaScript file, then sends a request to /wp-json/batch/v1 to confirm the batch endpoint is accessible. If the response is not rest_no_route, the target is considered vulnerable.
Phase 2: Route Confusion (CVE-2026-63030)
The script sends a batch payload containing two subrequests:
Because WordPress processes batches in parallel without state synchronization, the validation of the second request is bypassed.
Phase 3: SQL Injection (CVE-2026-60137)
The author__not_in payload is injected into an improperly escaped SQL query. The script uses UNION-based injection to:
· Extract password hashes from wp_users. · Insert a fake row into wp_posts as "seeding" for the oEmbed cache.
Phase 4: Admin Creation
The script leverages customizer changeset re-entrancy to register a new user with the administrator role. If this method fails, an alternative method is used: a batch request with a malformed primer to bypass user creation validation.
Phase 5: Webshell Upload
After logging in as admin, the script:
The shell is accessible at:
https://target.com/wp-content/themes/[theme]/404.php?c=id
Code Structure
wp2shell.py
├── class WP2Shell
│ ├── request() # HTTP wrapper with cookie jar
│ ├── batch_request() # Send to /wp-json/batch/v1
│ ├── check() # Probe version + endpoint
│ ├── sqli_sleep() # Time-based SQLi test
│ ├── extract_data() # Blind extraction char-by-char
│ ├── dump_users() # UNION SQLi to dump users
│ ├── create_admin() # Customizer re-entrancy
│ ├── alt_create_admin() # Batch bypass alternative
│ ├── upload_shell() # Theme editor webshell
│ ├── exploit() # Full chain
│ └── interactive_shell() # Interactive shell
└── main() # CLI parser
Indicators of Compromise (IoC)
After successful exploitation, the target will show:
· A new user with the prefix wp2s_ in the wp_users table. · A 404.php file in the theme directory containing . · POST requests to /wp-json/batch/v1 with author__not_in payloads containing SQL characters. · POST requests to /wp-admin/admin-ajax.php?action=customize_save with customized JSON containing wp_user_roles. · Access log entries to /wp-content/themes/[theme]/404.php?c=....
Mitigation
add_filter('rest_endpoints', function($endpoints) {
unset($endpoints['/wp/v2/batch']);
return $endpoints;
});
Disclaimer
This script is provided for educational purposes and authorized security testing only. Use against systems without written permission is illegal and violates the law. The author is not responsible for any misuse.