9.1critical
Authorization Bypass in Next.js Middleware
- Severity
- 9.1critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 99.2% (higher than 99% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-f82v-jwr5-mffw
Description
Next.js is a React framework for building full-stack web applications. Starting in version 1.11.4 and prior to versions 12.3.5, 13.5.9, 14.2.25, and 15.2.3, it is possible to bypass authorization checks within a Next.js application, if the authorization check occurs in middleware. If patching to a safe version is infeasible, it is recommend that you prevent external user requests which contain the x-middleware-subrequest header from reaching your Next.js application. This vulnerability is fixed in 12.3.5, 13.5.9, 14.2.25, and 15.2.3.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| vercel next.js | >= 11.1.4, < 12.3.5, >= 14.0.0, < 14.2.25, >= 15.0.0, < 15.2.3, >= 13.0.0, < 13.5.9, from 11.1.4 before 12.3.5, from 13.0.0 before 13.5.9, from 14.0.0 before 14.2.25, from 15.0.0 before 15.2.3 | CVE List, NVD |
| next (npm) | from 13.0.0 before 13.5.9, from 14.0.0 before 14.2.25, from 15.0.0 before 15.2.3, from 12.0.0 before 12.3.5 | GitHub Advisory Database |
All scores
| GitHub_M | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
Classification
What each source says
CVE List
Next.js is a React framework for building full-stack web applications. Starting in version 1.11.4 and prior to versions 12.3.5, 13.5.9, 14.2.25, and 15.2.3, it is possible to bypass authorization checks within a Next.js application, if the authorization check occurs in middleware. If patching to a safe version is infeasible, it is recommend that you prevent external user requests which contain the x-middleware-subrequest header from reaching your Next.js application. This vulnerability is fixed in 12.3.5, 13.5.9, 14.2.25, and 15.2.3.
GitHub Advisory Database
Impact
It is possible to bypass authorization checks within a Next.js application, if the authorization check occurs in middleware.
Patches
- For Next.js 15.x, this issue is fixed in
15.2.3 - For Next.js 14.x, this issue is fixed in
14.2.25 - For Next.js 13.x, this issue is fixed in 13.5.9
- For Next.js 12.x, this issue is fixed in 12.3.5
- For Next.js 11.x, consult the below workaround.
Note: Next.js deployments hosted on Vercel are automatically protected against this vulnerability.
Workaround
If patching to a safe version is infeasible, we recommend that you prevent external user requests which contain the x-middleware-subrequest header from reaching your Next.js application.
Credits
- Allam Rachid (zhero;)
- Allam Yasser (inzo_)
NVD (es)
Next.js es un framework de React para crear aplicaciones web full-stack. En versiones anteriores a la 14.2.25 y la 15.2.3, era posible omitir las comprobaciones de autorización dentro de una aplicación Next.js si esta se realizaba en middleware. Si no es posible aplicar una versión segura, se recomienda evitar que las solicitudes de usuarios externos que contengan el encabezado "x-middleware-subrequest" lleguen a la aplicación Next.js. Esta vulnerabilidad se corrigió en las versiones 14.2.25 y 15.2.3.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-29927 changed 2025-04-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-f82v-jwr5-mffw changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2025-29927 changed 2026-06-17 | Public domain |