Security Digest · Vulnerability record
CVE-2025-29927: Authorization Bypass in Next.js Middleware
Next.js is a React framework for building full-stack web applications.
CVSS 9.1 Critical EPSS 99.2% · p99.9 Check exposure
Should you act?
High exploit likelihood
EPSS ranks it in the top 5% of all CVEs for likely exploitation in the next 30 days. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 99.2%, percentile 99.9: FIRST’s model estimates a 99.2% chance of exploitation activity in the next 30 days, higher than 99.9% of all scored CVEs (very high). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes
next(npm) >= 13.0.0, < 13.5.9, fixed in 13.5.9;next(npm) >= 14.0.0, < 14.2.25, fixed in 14.2.25;next(npm) >= 15.0.0, < 15.2.3, fixed in 15.2.3;next(npm) >= 12.0.0, < 12.3.5, fixed in 12.3.5. Check your lockfile, including transitive dependencies. - Editorial verdict: Check exposure. Next.js Middleware Authorization Bypass (CVE-2025-29927) — Patched since March 2025 and easy to fix; if you self-host Next.js and lean on middleware for auth, confirm you are on a fixed release and that the header is stripped at your edge.
What it is
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.
From the GitHub advisory
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
Weakness type: CWE-285, CWE-863.
Product: next (npm) · Assigned by: GitHub_M · Published: 2025-03-21
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| npm | next | >= 13.0.0, < 13.5.9 | 13.5.9 |
| npm | next | >= 14.0.0, < 14.2.25 | 14.2.25 |
| npm | next | >= 15.0.0, < 15.2.3 | 15.2.3 |
| npm | next | >= 12.0.0, < 12.3.5 | 12.3.5 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| 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 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_M | 3.1 | 9.1 Critical | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Privileges required: none (no login)
- User interaction: none
- Scope: unchanged
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none, automatable yes, technical impact total.
- FIRST EPSS (model of 2026-10-21): 99.22% probability of exploitation activity in the next 30 days; percentile 99.9.
Timeline
- — CVE record published by GitHub_M
- — GitHub-reviewed advisory GHSA-f82v-jwr5-mffw published (critical)
- — erroneo.us brief: Next.js Middleware Authorization Bypass (CVE-2025-29927)
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-f82v-jwr5-mffw github.com
- CVE.org record CVE-2025-29927 cve.org
- NVD entry CVE-2025-29927 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- openwall.com openwall.com
- openwall.com openwall.com
- security.netapp.com security.netapp.com
- vercel.com vercel.com