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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | jitsucom-jitsu +2 | 2.9.0-r0 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Next.js Middleware Authorization Bypass Scanner
auxiliary/scanner/http/nextjs_middleware_auth_bypass
Exploit-DB 1
- Next.js Middleware 15.2.2 - Authorization Bypass EDB-52124 · webapps · Apr 5, 2025
GitHub 133 repositories · most starred shown
-
aydinnyunus/CVE-2025-29927 ★ 103 · Mar 23, 2025
CVE-2025-29927 Proof of Concept
-
AnonKryptiQuz/NextSploit ★ 92 · Mar 28, 2025
NextSploit is a command-line tool designed to detect and exploit CVE-2025-29927, a security flaw in Next.js
-
websecnl/CVE-2025-29927-PoC-Exploit ★ 20 · Mar 23, 2025
Proof-of-Concept for Authorization Bypass in Next.js Middleware
-
6mile/nextjs-CVE-2025-29927 ★ 19 · Mar 23, 2025
A Nuclei template to detect CVE-2025-29927 the Next.js authentication bypass vulnerability
-
azu/nextjs-cve-2025-29927-poc ★ 15 · Mar 23, 2025
Next.js PoC for CVE-2025-29927
-
UNICORDev/exploit-CVE-2025-29927 ★ 14 · Apr 14, 2025
Exploit for CVE-2025-29927 (Next.js) - Authorization Bypass
-
lirantal/vulnerable-nextjs-14-CVE-2025-29927 ★ 14 · Mar 23, 2025
-
MuhammadWaseem29/CVE-2025-29927-POC ★ 10 · Mar 23, 2025
Authorization Bypass in Next.js Middleware
-
kOaDT/poc-cve-2025-29927 ★ 9 · Mar 26, 2025
This repository contains a proof of concept (POC) and an exploit script for CVE-2025-29927, a critical vulnerability in Next.js that allows attackers to bypass authorization checks implemented in mid…
-
phoscoder/ghost-route ★ 9 · Mar 25, 2025
Ghost Route detects if a Next JS site is vulnerable to the corrupt middleware bypass bug (CVE-2025-29927)
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Next.js Middleware Bypass http/cves/2025/CVE-2025-29927.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | next | >= 13.0.0, < 13.5.9 | 13.5.9 | GHSA-f82v-jwr5-mffw |
| npm | next | >= 14.0.0, < 14.2.25 | 14.2.25 | GHSA-f82v-jwr5-mffw |
| npm | next | >= 15.0.0, < 15.2.3 | 15.2.3 | GHSA-f82v-jwr5-mffw |
| npm | next | >= 12.0.0, < 12.3.5 | 12.3.5 | GHSA-f82v-jwr5-mffw |
Advisories 2
- WID-SEC-2025-0627 Vercel Next.js: Schwachstelle ermöglicht Umgehen von Sicherheitsvorkehrungen BSI CERT-Bund (WID) · Dec 23, 2025
- NCSC-2025-0096 Kwetsbaarheid verholpen in Next.js NCSC-NL (Netherlands) · Mar 25, 2025
References
- https://github.com/vercel/next.js/security/advisories/GHSA-f82v-jwr5-mffw
- https://github.com/vercel/next.js/commit/52a078da3884efe6501613c7834a3d02a91676d2
- https://github.com/vercel/next.js/commit/5fd3ae8f8542677c6294f32d18022731eab6fe48
- https://github.com/vercel/next.js/releases/tag/v12.3.5
- https://github.com/vercel/next.js/releases/tag/v13.5.9