Vulnerability · Published Mar 21, 2025 · Assigned by GitHub_M
CVE-2025-29927Authorization Bypass in Next.js Middleware
Critical 9.1
In plain English
A critical-severity security flaw in next.js from vercel. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 99.2% (higher than 99.9% of all known vulnerabilities). Ready-made attack tooling exists: Metasploit, Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | next | 13.5.9 | GHSA-f82v-jwr5-mffw |
| npm | next | 14.2.25 | GHSA-f82v-jwr5-mffw |
| npm | next | 15.2.3 | GHSA-f82v-jwr5-mffw |
| npm | next | 12.3.5 | GHSA-f82v-jwr5-mffw |
Affected products (as reported)
Weakness: CWE-285 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
References
- https://github.com/vercel/next.js/security/advisories/GHSA-f82v-jwr5-mffw x_refsource_CONFIRM
- https://github.com/vercel/next.js/commit/52a078da3884efe6501613c7834a3d02a91676d2 x_refsource_MISC
- https://github.com/vercel/next.js/commit/5fd3ae8f8542677c6294f32d18022731eab6fe48 x_refsource_MISC
- https://github.com/vercel/next.js/releases/tag/v12.3.5 x_refsource_MISC
- https://github.com/vercel/next.js/releases/tag/v13.5.9 x_refsource_MISC
- http://www.openwall.com/lists/oss-security/2025/03/23/3
- http://www.openwall.com/lists/oss-security/2025/03/23/4
- https://security.netapp.com/advisory/ntap-20250328-0002/