Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
CRITICAL severity

CVE-2025-29927 — next

CRITICALFix: vercel/next.js@52a078d

CVE-2025-29927 is a critical-severity (CVSS 9.1) CWE-285 vulnerability in next. 21 public exploit references exist, so weaponization risk is real. A fix is available for next — see the affected versions and patch details below.

Authorization Bypass in Next.js Middleware

Also known asGHSA-f82v-jwr5-mffw
Published
Updated
Affected
4 pkgs
Patched
4 / 4
Exploits
21 known
Exploitation data as of Oct 23, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2025-29927.

EPSS Exploitation Probability

via FIRST.org ↗
99.2%probability of exploitation in next 30 days
Very High Risk0.00%
Lower risk than most CVEs100th percentile — riskier than 100% of all scored CVEsHighest risk
89.9%93.2%96.6%100.0%93.0%99.2%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2025-29927 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).

Where this sits among everything scored

Of 394,415 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

4 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

61Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
nextnpm
41.1Mdownloads / week

Description

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_)

Affected Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
📦npmnext≥ 13.0.0&&< 13.5.913.5.9npm install next@13.5.9
📦npmnext≥ 14.0.0&&< 14.2.2514.2.25npm install next@14.2.25
📦npmnext≥ 15.0.0&&< 15.2.315.2.3npm install next@15.2.3
📦npmnext≥ 12.0.0&&< 12.3.512.3.5npm install next@12.3.5

Affected Products

1 product · 4 configurations
Application
next.jsvercel
≥ 15.0.0 && < 15.2.3
range
Exploits & PoCs
21

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

EDB-52124webappsmultiple

Next.js Middleware 15.2.2 - Authorization Bypass

by kOaDT · Apr 5, 2025

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for next, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update next to 13.5.9 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-29927 is resolved across your whole dependency graph.

  3. Workarounds

    Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.

How to detect CVE-2025-29927

A community-maintained Nuclei template exists for this CVE. You can scan for it directly:

nuclei -id cve-2025-29927 -u https://target
Template
Next.js Middleware Bypass
Severity
critical
Impact
Unauthenticated attackers can bypass middleware security controls when the baseline request proves middleware enforcement and the bypass response exposes protected content.
Remediation
Upgrade to Next.js 14.2.25 or 15.2.3 or later. Block the x-middleware-subrequest header at the edge.

Template by ProjectDiscovery nuclei-templates (pdresearch, pdteam, hazedic), MIT licensed. View the full template. Scan only systems you are authorised to test.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatCritical

This vulnerability is rated as Critical impact, rather than Important, because it allows complete authorization bypass in affected Next.js versions. Attackers can circumvent middleware-based authentication and access protected routes simply by including a specific HTTP header (x-middleware-subrequest). This bypasses…

Workaround published by Red Hat
Block or drop external user requests which contain the x-middleware-subrequest header from reaching your Next.js application.
Source: Red Hat security advisory for CVE-2025-29927 (CC BY 4.0)

Frequently Asked Questions

# 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
O3 Security · Impact-Aware SCA

Is CVE-2025-29927 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2025-29927: next — Fixed in 13.5.9