Patchfirst
CVE-2025-29927 Public exploit Critical · 9.1 EPSS 99.2%

Authorization Bypass in Next.js Middleware

vercel · next.js

Summary

A flaw in the middleware of Next.js, the React framework for full-stack web applications, allows authorization checks performed in middleware to be bypassed. An unauthenticated remote attacker over the network can exploit it without any user interaction or special configuration, simply by sending requests containing the x-middleware-subrequest header.

Official description · CVE.org

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.

Breakdown
66.4 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 7 days after disclosure. Public exploit code (Metasploit) was available the same day.

  1. DisclosedPublic exploit codeMetasploitday 0
  2. First seen exploitedVulnCheck KEV evidence+7 days

See the family tree

3 related vulnerabilities in the same code over 17 months. The latest fix listed for next is 15.4.5.

Same bug familyLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. This CVECVE-2025-29927Authorization Bypass in Next.js Middleware21 Mar 2025
  2. relatedHigh

    Why these are linked:

    CVE-2026-33768Astro: Unauthenticated Path Override via `x-astro-path` /…24 Mar 2026
  3. relatedHigh

    Why these are linked:

    • Linked in OSV/GitHub advisoryGHSA-x27w-589x-frm2
    • Similar weakness in the same product (machine-matched)same product + CWE + description similarity
    CVE-2026-73424Astro: Unauthenticated path override in the @astrojs/vercel ISR…17 Aug 2026

Fixes in nextnpm package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 15.1.2CVE-2024-563323 Jan 2025
  2. 15.1.6CVE-2025-3242114 May 2025
  3. 15.1.8CVE-2025-498263 Jul 2025
  4. 15.2.2CVE-2025-4806830 May 2025
  5. 15.2.3CVE-2025-2992721 Mar 2025
  6. 15.2.4CVE-2025-302182 Apr 2025
  7. 15.3.3CVE-2025-490053 Jul 2025
  8. 15.4.5CVE-2025-5517329 Aug 2025Latest listed

techniques

No techniques linked

No ATT&CK techniques are linked to this CVE yet. MITRE CTID has not mapped it, and no report passage in the corpus ties it to a technique.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: next.

Upgrade to 15.2.3 or later

npmnpm install next@15.2.3

The first fix for CVE-2025-29927.

Affected versions, by release line

If you runUpgrade to
15.0.0 up to 15.2.315.2.3
14.0.0 up to 14.2.2514.2.25
13.0.0 up to 13.5.913.5.9
12.0.0 up to 12.3.512.3.5

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

References

8 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close