CVE-2025-29927: CVE-2025-29927: Next.js is a React framework for building full-stack web applications. Starting in version…
vercel · next.js · NVD published 2025-03-21 · posted 2025-03-21 · last modified 2026-06-17
What it is
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.
| Weakness | CWE-285CWE-863 |
|---|---|
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N (source: [email protected]) |
| ATT&CK tactics | Privilege Escalation |
Exploitation evidence
First exploit evidence seen: 2025-03-21 (earliest date across the sources below).
Exploited in the wild
No source on this site lists in-the-wild exploitation yet (CISA KEV, VulnCheck KEV).
Public exploit code
Metasploit
auxiliary/scanner/http/nextjs_middleware_auth_bypass: Next.js Middleware Authorization Bypass Scanner (disclosure 2025-03-21)
Exploit-DB
- EDB-52124: Next.js Middleware 15.2.2 - Authorization Bypass (2025-04-05)
GitHub proof-of-concept repositories
126 public repositories from 124 accounts, first seen 2025-03-22. Most starred: aydinnyunus/CVE-2025-29927 (101 stars), view repository.
Verify before running: public PoCs can be malicious. Read the code and only run it in an isolated lab. A PoC means exploit code is public, not that this CVE is exploited in the wild.
Sources: Rapid7 Metasploit Framework module metadata · Exploit-DB (OffSec) · nomi-sec/PoC-in-GitHub.
Defend the Chain
The attack chain for CVE-2025-29927 laid across the MITRE ATT&CK Enterprise tactics. Solid cards come from the MITRE CTID KEV mappings; dashed cards are inferred by CVERadar from the CWE or description. Correct defences are real ATT&CK mitigations for that technique.
Pick a red technique card on the board, then choose the defence that stops it.
Defend against T1068 Exploitation for Privilege Escalation Inferred
Inferred from CWE CWE-863
How to fix it
Fixed versions
- vercel next.js: upgrade to 12.3.5 or later (affected from 11.1.4)
- vercel next.js: upgrade to 13.5.9 or later (affected from 13.0.0)
- vercel next.js: upgrade to 14.2.25 or later (affected from 14.0.0)
- vercel next.js: upgrade to 15.2.3 or later (affected from 15.0.0)
Derived from the NVD CPE configuration (versionEndExcluding / versionEndIncluding). Always confirm with the vendor advisory.
Vendor advisories and patches
- https://github.com/vercel/next.js/commit/52a078da3884efe6501613c7834a3d02a91676d2 (Patch)
- https://github.com/vercel/next.js/commit/5fd3ae8f8542677c6294f32d18022731eab6fe48 (Patch)
- https://github.com/vercel/next.js/releases/tag/v12.3.5 (Release Notes)
- https://github.com/vercel/next.js/releases/tag/v13.5.9 (Release Notes)
- https://github.com/vercel/next.js/security/advisories/GHSA-f82v-jwr5-mffw (Vendor Advisory)
MITRE ATT&CK mitigations for this chain
- M1051 Update Software (for T1068) : Update software regularly by employing patch management for internal enterprise endpoints and servers.
- M1050 Exploit Protection (for T1068) : Security applications that look for behavior used during exploitation such as Windows Defender Exploit Guard (WDEG) and the Enhanced Mitigation Experience Toolkit (EMET) can be used to mitigate some exploitation behavior. Control flow integrity checking is another way to potentially identify and stop a software exploi
- M1048 Application Isolation and Sandboxing (for T1068) : Make it difficult for adversaries to advance their operation through exploitation of undiscovered or unpatched vulnerabilities by using sandboxing. Other types of virtualization and application microsegmentation may also mitigate the impact of some types of exploitation. Risks of additional exploits and weaknesses in t
- M1019 Threat Intelligence Program (for T1068) : Develop a robust cyber threat intelligence capability to determine what types and levels of threat may use software exploits and 0-days against a particular organization.
- M1038 Execution Prevention (for T1068) : Consider blocking the execution of known vulnerable drivers that adversaries may exploit to execute code in kernel mode. Validate driver block rules in audit mode to ensure stability prior to production deployment.
Detection Generic guidance
- Privilege Escalation: Alert on processes gaining SYSTEM/root unexpectedly, and on exploitation crashes of privileged services.
Response checklist Generic guidance
- Inventory: find every instance of the affected product and version (include internet-facing and forgotten ones).
- Patch or mitigate per the vendor advisory; if you cannot patch, remove internet exposure or apply the vendor workaround.
- Assume compromise if the system was exposed before patching: hunt for the indicators in the advisory and review logs back to the disclosure date.
- Rotate credentials and secrets stored on or used by the affected system if compromise cannot be ruled out.
Sources
- NVD: CVE-2025-29927
- CVE.org record
- FIRST EPSS (2026-10-24)
- http://www.openwall.com/lists/oss-security/2025/03/23/3 (Mailing List, Third Party Advisory)
- http://www.openwall.com/lists/oss-security/2025/03/23/4 (Mailing List)
- https://security.netapp.com/advisory/ntap-20250328-0002/ (Third Party Advisory)