Authorization bypass via trusted internal request header
Published Mar 21, 2025 · Updated Apr 8, 2025
Authorization bypass in affected Next.js releases allows remote attackers to access routes protected only by Middleware. The router trusts an externally supplied x-middleware-subrequest header as an internal recursion marker and skips Middleware execution. The application must be self-hosted with authorization enforced only in Middleware; static exports and deployments on Vercel, Netlify, or Cloudflare Workers are not affected.
Summary
What happened
Authorization bypass in affected Next.js releases allows remote attackers to access routes protected only by Middleware. The router trusts an externally supplied x-middleware-subrequest header as an internal recursion marker and skips Middleware execution. The application must be self-hosted with authorization enforced only in Middleware; static exports and deployments on Vercel, Netlify, or Cloudflare Workers are not affected.
The record
- CVE
- CVE-2025-29927
- Published
- Mar 21, 2025
- Updated
- Apr 8, 2025
- Vendor
- Vercel
- Product
- Next.js
- Classifications
- CWE-285, CWE-863, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Mar 21, 2025CVE publishedPublication date reported by the CVE source.
- Apr 8, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=>= 11.1.4, < 12.3.5
- Affected versionversion=>= 13.0.0, < 13.5.9
- Affected versionversion=>= 14.0.0, < 14.2.25
- Affected versionversion=>= 15.0.0, < 15.2.3
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- CVE-2025-29927 Next.js Middleware Bypass PoCproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo