Critical severityNVD Advisory· Published Mar 21, 2025· Updated Apr 8, 2025
Authorization Bypass in Next.js Middleware
CVE-2025-29927
Description
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
nextnpm | >= 13.0.0, < 13.5.9 | 13.5.9 |
nextnpm | >= 14.0.0, < 14.2.25 | 14.2.25 |
nextnpm | >= 15.0.0, < 15.2.3 | 15.2.3 |
nextnpm | >= 12.0.0, < 12.3.5 | 12.3.5 |
Affected products
8- osv-coords7 versionspkg:apk/chainguard/jitsucom-jitsupkg:apk/chainguard/jitsucom-jitsu-consolepkg:apk/chainguard/jitsucom-jitsu-rotorpkg:apk/wolfi/jitsucom-jitsupkg:apk/wolfi/jitsucom-jitsu-consolepkg:apk/wolfi/jitsucom-jitsu-rotorpkg:npm/next
< 2.9.0-r0+ 6 more
- (no CPE)range: < 2.9.0-r0
- (no CPE)range: < 2.9.0-r0
- (no CPE)range: < 2.9.0-r0
- (no CPE)range: < 2.9.0-r0
- (no CPE)range: < 2.9.0-r0
- (no CPE)range: < 2.9.0-r0
- (no CPE)range: >= 13.0.0, < 13.5.9
Patches
Vulnerability mechanics
References
11- github.com/advisories/GHSA-f82v-jwr5-mffwghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-29927ghsaADVISORY
- www.openwall.com/lists/oss-security/2025/03/23/3ghsaWEB
- www.openwall.com/lists/oss-security/2025/03/23/4ghsaWEB
- github.com/vercel/next.js/commit/52a078da3884efe6501613c7834a3d02a91676d2ghsax_refsource_MISCWEB
- github.com/vercel/next.js/commit/5fd3ae8f8542677c6294f32d18022731eab6fe48ghsax_refsource_MISCWEB
- github.com/vercel/next.js/releases/tag/v12.3.5ghsax_refsource_MISCWEB
- github.com/vercel/next.js/releases/tag/v13.5.9ghsax_refsource_MISCWEB
- github.com/vercel/next.js/security/advisories/GHSA-f82v-jwr5-mffwghsax_refsource_CONFIRMWEB
- security.netapp.com/advisory/ntap-20250328-0002ghsaWEB
- vercel.com/changelog/vercel-firewall-proactively-protects-against-vulnerability-with-middlewareghsaWEB
News mentions
4- Weekly Metasploit Update: Modules for Audiobookshelf, LiteLLM, Next.js, Dalfox and moreRapid7 Blog · Jun 26, 2026
- ‘PCPJack’ Worm Removes TeamPCP Infections, Steals CredentialsSecurityWeek · May 8, 2026
- New PCPJack worm steals credentials, cleans TeamPCP infectionsBleepingComputer · May 7, 2026
- PCPJack Credential Stealer Exploits 5 CVEs to Spread Worm-Like Across Cloud SystemsThe Hacker News · May 7, 2026