A small Python checker for the WordPress issue commonly referred to as wp2shell.
It checks the exposed WordPress version when available and probes the REST Batch endpoint to classify the target as vulnerable, patched, blocked, or inconclusive.
- Python 3.9+
requests
python -m pip install requestspython wp2shell_checker.py https://example.com --authorizedJSON output:
python wp2shell_checker.py https://example.com --authorized --jsonCustom timeout:
python wp2shell_checker.py https://example.com --authorized --timeout 20Ignore TLS certificate errors:
python wp2shell_checker.py https://example.com --authorized --insecureusage: wp2shell_checker.py [-h] [--authorized] [--timeout TIMEOUT]
[--insecure] [--json]
target
target: WordPress URL or hostname.--authorized: Required confirmation that you are allowed to test the target.--timeout: Request timeout in seconds. Default:10.--insecure: Disable TLS certificate verification.--json: Print the full report as JSON.
Possible final classifications include:
VULNERABLENOT_VULNERABLEMITIGATED_OR_BLOCKEDLIKELY_VULNERABLE_BY_VERSIONLIKELY_FIXED_BY_VERSIONINCONCLUSIVE
Exit codes:
0: patched or likely fixed1: vulnerable or likely vulnerable2: invalid usage or missing dependency3: blocked or inconclusive
Version detection is best effort. WordPress, a CDN, a WAF, or a security plugin may hide the version or alter the Batch endpoint response.
The checker does not run an SQL injection or command-execution payload.
Use it only on systems you own or are authorized to assess.
MIT License.