
A deliberately Next.js app, vulnerable to CVE-2025-29927, Authorization Bypass
This project is a Next.js application that has been intentionally configured to be vulnerable to an Authorization Bypass in Next.js Middleware (CVE-2025-29927). It is provided solely for lawful, educational, and research purposes.
By accessing, using, or distributing this code, you acknowledge and agree that:
Install Docker and then run:
docker build -t next-cve-2025-29927 .
docker run -p 3000:3000 next-cve-2025-29927
Open http://localhost:3000 with your browser to see the result.
Capture the request using an intercepting proxy such as ZAP or Burp, and inject the following header into the request:
x-middleware-subrequest: middleware:middleware:middleware:middleware:middleware
>= 13.0.0, < 13.5.9
>= 14.0.0, < 14.2.25
>= 15.0.0, < 15.2.3
>= 11.1.4, < 12.3.5
Patch to the latest versions
13.5.9
14.2.25
15.2.3
12.3.5
or if you cannot update, block the requests which contain the x-middleware-subrequest header.
To learn more about the vulnerability, take a look at the following resources: