A proof-of-concept tool that demonstrates an unauthenticated SQL injection and RCE chain in WordPress via a batch route confusion vulnerability.

Stars

373

7-day growth

No data

Forks

90

Open issues

0

License

MIT

Last updated

2026-07-20

Why it is worth attention

It provides a full pre-auth to RCE exploit chain, including a novel SQLi-to-admin bridge, with multiple extraction techniques and minimal dependencies.

Who it is for

  • Security researchers analyzing WordPress core vulnerabilities
  • WordPress site administrators needing to assess exposure
  • Penetration testers performing authorized security assessments
  • CTF participants and educational exploit developers

Use cases

  • Check if a WordPress site is vulnerable to the wp2shell SQLi
  • Extract database contents like user hashes or custom queries via SQL injection
  • Execute commands by chaining SQL injection to administrator account creation and plugin upload
  • Demonstrate the full exploit path for training or reporting

Strengths

  • No third-party dependencies (only Python standard library)
  • Supports multiple SQLi techniques (UNION, error-based, blind) with automatic fallback
  • Automates the entire pre-auth to RCE process, including cleanup of generated accounts and shells
  • Includes a non-destructive check mode that uses marker probes without sending an SQLi payload

Considerations

  • Only works on specific vulnerable WordPress versions (6.9.0–6.9.4, 7.0.0–7.0.1)
  • The active SQLi confirmation and shell steps may be blocked by Web Application Firewalls (WAFs)
  • Command execution requires either supplied admin credentials or successful pre-auth bridge, which may fail in hardened environments

README quick start

wp2shell-poc

Independent proof-of-concept for the unauthenticated WordPress REST batch route-confusion SQL injection associated with Searchlight Cyber's wp2shell advisory.

This repository is not Searchlight Cyber's official checker. check confirms the SQLi path, read demonstrates database read, and shell opens a plugin-backed command shell either with supplied administrator credentials or by first exercising the SQLi-to-admin bridge.

Affected versions

Searchlight Cyber's advisory lists these wp2shell RCE exposure ranges:

Version rangeStatus
[options]

Or `pip install .` to get a `wp2shell` command on your `PATH`.

### check — non-destructive vulnerability check

Prints passive WordPress markers and public version hints first, then sends a benign batch marker
probe. A vulnerable batch implementation returns HTTP 207 with the route-confusion marker pattern
`parse_path_failed`, `block_cannot_read`, and `rest_batch_not_allowed`.

The marker probe is based on the WordPress core fix. The malformed `///` request creates
`parse_path_failed`; a `/wp/v2/posts` request acts as a batch-allowed spacer; the
`/wp/v2/block-renderer/...` route is not batch-allowed but returns `block_cannot_read` if its
handler is reached anonymously; `/batch/v1` gives `rest_batch_not_allowed`. On vulnerable builds
the parse error shifts the batch handler arrays out of step, so the spacer request is dispatched
under the block-renderer handler. Fixed builds keep the arrays aligned, so this exact all-three
pattern should not appear for the crafted probe.

By default, `check` stops there and does not send an SQLi payload. Use `--confirm-sqli` when you
also want an active SQLi confirmation. The confirmation tries the UNION read primitive first and
falls back to paired timing probes if UNION reflection is unavailable.

The signals are independent: a version hint is only a hint, the marker pattern shows route
confusion, and `--confirm-sqli` shows a payload reached the database. A WAF can block the payload,
so a failed confirmation doesn't prove the bug is absent.

./wp2shell.py check http://target ./wp2shell.py check targets.txt # scan every URL in the file


### read — extract data through SQL injection

./wp2shell.py read http://target # server fingerprint ./wp2shell.py read http://target --preset

Description

wp2shell (CVE-2026-63030 & CVE-2026-60137) - full RCE chain

Related repositories

Similar projects matched by category, topics, and programming language.

NousResearch
Featured
NousResearch GitHub avatar

hermes-agent

Hermes Agent is an open-source, self-improving AI agent with a built-in learning loop that creates skills from experience, runs across platforms, and supports any LLM provider.

AI & Machine Learning
215,644
littledivy
Featured
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI & Machine LearningDeveloper Tools
1,183
joeseesun
Featured
joeseesun GitHub avatar

qiaomu-goal-meta-skill

qiaomu-goal-meta-skill transforms vague requests into a copy-ready Codex /goal command with defaults, verification, boundaries, and pause conditions.

AI & Machine Learning
776