Skip to main content

CVE-2025-29927 — Authorization Bypass in next — CVE Details

CRITICAL

Authorization Bypass in Next.js Middleware

Published March 21, 2025Updated September 10, 2026Source: OSV

What Should I Do?

Fix in Your Next Sprint

This vulnerability has a 75.27% chance of being exploited within 30 days.

Does your project use an affected next version?

Paste your package-lock.json to check it for CVE-2025-29927 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary

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

  • Allam Rachid (zhero;)
  • Allam Yasser (inzo_)

Advisory Timeline

  • First published March 21, 2025 (615 days ago).
  • Last revised September 10, 2026 — 538 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update next to 14.2.25 or later
npm install next@14.2.25
npm
Update next to 12.3.5 or later
npm install next@12.3.5
npm
Update next to 15.2.3 or later
npm install next@15.2.3
npm
Update next to 13.5.9 or later
npm install next@13.5.9

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (4)

Affects 1 ecosystem: npm (1).

PackageFixed In
next npm · Affected: All versions14.2.25
next npm · Affected: All versions12.3.5
next npm · Affected: All versions15.2.3
next npm · Affected: All versions13.5.9

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-285
    Improper AuthorizationMITRE
  • CWE-863
    Incorrect AuthorizationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Frequently Asked Questions

What is CVE-2025-29927?
Authorization Bypass in Next.js Middleware. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
How do I check if my project is affected by CVE-2025-29927?
CVE-2025-29927 affects next. It has a 75.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-29927 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.1

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
75.27%
EPSS percentile: 99.7

This places it in the top 5% of EPSS-scored vulnerabilities — 99.7% of tracked vulnerabilities score at or below it, so it is far more likely to be exploited than nearly all other tracked vulnerabilities.

Also Known As

GHSA-f82v-jwr5-mffw

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json