CVE-2025-29927 Authorization Bypass in Next.js Middleware
Attackers can bypass authorization checks in Next.js middleware by sending a specific header, allowing unauthorized access to protected resources.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-29927?
CVE-2025-29927 is a critical authentication bypass vulnerability in Vercel Next.js, published on 21 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
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.
Which versions are affected by CVE-2025-29927?
8 open source packages ship an affected version, including next. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
next npm | From 12.0.0 | 12.3.5 |
next npm | From 12.0.0 | 12.3.5 |
next npm | From 13.0.0 | 13.5.9 |
next npm | From 13.0.0 | 13.5.9 |
next npm | From 14.0.0 | 14.2.25 |
next npm | From 14.0.0 | 14.2.25 |
2 more packages
next npm | From 15.0.0 | 15.2.3 |
next npm | From 15.0.0 | 15.2.3 |
Products include Vercel Next.js.
How do I fix CVE-2025-29927?
Upgrade next to a fixed version for your release line: 12.3.5, 13.5.9, 14.2.25 or 15.2.3.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2025-29927 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-29927 exists.
Public exploit code: 1 Metasploit module, 1 Exploit-DB entry, 1 Nuclei template and 127 proofs of concept on GitHub.
Other vulnerabilities in Vercel Next.js
- CVE-2026-44578 Next.js: Server-side request forgery in applications using WebSocket upgrades
- CVE-2026-94483 Next.js: Server-Side Request Forgery in Image Optimization
- CVE-2026-64642 Next.js: Middleware / Proxy bypass in App Router applications using Turbopack and single locale
- CVE-2026-64645 Next.js: Server-Side Request Forgery in rewrites via attacker-controlled destination hostname
- CVE-2026-64649 Next.js: Server-Side Request Forgery in Server Actions on Custom Servers
Sources
Also known as GHSA-f82v-jwr5-mffw, MINI-fwhh-grf5-h64v, ROOT-APP-NPM-CVE-2025-29927.