explaingit

icex0/wp2shell-poc

Analysis updated 2026-05-18

485PythonAudience · developerComplexity · 4/5Setup · easy

TLDR

A Python proof of concept exploiting two WordPress CVEs that chains an unauthenticated SQL injection into full remote command execution.

Mindmap

mindmap
  root((repo))
    What it does
      WordPress RCE PoC
      Pre auth SQL injection
      Chains to admin account
    Tech stack
      Python
    Use cases
      Vulnerability verification
      Authorized data extraction
      Security assessment demo
    Audience
      Security researchers
      Pentesters

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Verify whether a WordPress install between 6.9.0 and 7.0.1 is vulnerable to the wp2shell chain

USE CASE 2

Extract data like usernames and password hashes via the pre-auth SQL injection during authorized testing

USE CASE 3

Demonstrate full remote command execution in a security assessment against a vulnerable target

What is it built with?

Python

How does it compare?

icex0/wp2shell-poccvlab-kaist/videomamakasothaphie/genrecon
Stars485489478
LanguagePythonPythonPython
Last pushed2026-04-01
MaintenanceMaintained
Setup difficultyeasyhardhard
Complexity4/54/55/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Pure Python standard library, no dependencies, requires a WordPress target in the affected version range for authorized testing.

In plain English

wp2shell-poc is a proof of concept tool for a security flaw in WordPress, tracked as two CVEs, that was originally reported by Searchlight Cyber. This project is an independent recreation of the exploit, not the official checker from the company that found it. It targets WordPress versions between 6.9.0 and 7.0.1, and the tool documents exactly how the bug works alongside the code that exploits it. The underlying issue lives in WordPress's REST batch endpoint, a feature that lets several API requests be bundled and sent together without logging in first. Internally, the batch handler keeps two lists in step with each other, one tracking which code should handle each sub request and one tracking whether that sub request passed validation. A malformed sub request throws those two lists out of sync, so one request ends up being processed by a different handler than the one it was validated against. By carefully choosing which requests to bundle, an attacker can use this mismatch to slip a request past checks it should have failed, reaching a database query building path that does not properly escape one of its parameters. That opens the door to a SQL injection an attacker can trigger without any account on the site. From there the tool chains several more steps entirely without authentication: it uses the injection to plant fake blog post rows, tricks WordPress into generating real cached preview posts from them, reads the resulting post IDs back out through the same injection, and reshapes those IDs inside one more batch request until WordPress creates a brand new administrator account. Only the very last step, running a command on the server through the admin account's plugin upload feature, requires being logged in, and it uses the account the attack just created. The tool itself is a single Python script with no dependencies beyond the standard library, offering three modes: a safe check that looks for signs of the bug without touching the database, a read mode that pulls data like usernames and password hashes out through the injection, and a shell mode that runs commands on the target, either using given credentials or by first running the full unauthenticated chain. Any webshell or account the shell command creates is cleaned up automatically once the session ends.

Copy-paste prompts

Prompt 1
Explain how the REST batch route confusion in this PoC turns into a SQL injection.
Prompt 2
Walk me through the check command and what its marker pattern output means.
Prompt 3
Show me the difference between the union, error, and blind read techniques in this tool.
Prompt 4
Explain each step of the SQLi-to-admin chain that leads to remote command execution.

Frequently asked questions

What is wp2shell-poc?

A Python proof of concept exploiting two WordPress CVEs that chains an unauthenticated SQL injection into full remote command execution.

What language is wp2shell-poc written in?

Mainly Python. The stack also includes Python.

How hard is wp2shell-poc to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is wp2shell-poc for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.