Loading...
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

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 (570 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, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (4)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
next
npm
All versions14.2.25
next
npm
All versions12.3.5
next
npm
All versions15.2.3
next
npm
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. 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

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-f82v-jwr5-mffw

Related CVEs

  • CVE-2026-75604
    CRITICAL

    Next.js: Unauthenticated Remote Code Execution on windows-hosted servers

  • CVE-2026-107722
    CRITICAL

    fast-jwt: Incomplete patch of CVE-2026-34950: Non-whitespace key-prefix re-enables RSA→HS256 algorithm confusion

  • CVE-2026-108261
    CRITICAL

    TinaCMS admin preview iframe loads an attacker-controlled origin from the URL fragment

  • CVE-2026-44578
    HIGH

    Next.js vulnerable to server-side request forgery in applications using WebSocket upgrades

  • CVE-2026-64645
    HIGH

    Next.js: Server-Side Request Forgery in rewrites via attacker-controlled destination hostname

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies