CVE-2025-30218
next.js: Next.js may leak x-middleware-subrequest-id to external hosts
Overview
Description
Next.js is a React framework for building full-stack web applications. To mitigate CVE-2025-29927, Next.js validated the x-middleware-subrequest-id which persisted across multiple incoming requests. However, this subrequest ID is sent to all requests, even if the destination is not the same host as the Next.js application. Initiating a fetch request to a third-party within Middleware will send the x-middleware-subrequest-id to that third party. This vulnerability is fixed in 12.3.6, 13.5.10, 14.2.26, and 15.2.4.
Source: OX vulnerability database
Severity
5.9 · LOW
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness: CWE-200
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| npm | next | >=12.3.5, <12.3.6>=13.5.9, <13.5.10>=14.2.25, <14.2.26>=15.2.3, <15.2.4 | 12.3.613.5.1014.2.2615.2.4 |
Open a package to see all its vulnerabilities.
Operating systems · 5 fixes
Red Hat 5 releases · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 7 | firefox | affected |
| 8 | firefox +1 | affected |
| 9 | aspnetcore-runtime-7-0 +14 | affected |
| 9 (firefox:flatpak) | firefox +1 | affected |
| 9 (thunderbird:flatpak) | thunderbird | affected |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2025-30218
- github.com https://github.com/vercel/next.js
- github.com https://github.com/vercel/next.js/security/advisories/GHSA-223j-4rm8-mrmf
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2025-30218
- vercel.com https://vercel.com/changelog/cve-2025-30218-5DREmEH765PoeAsrNNQj3O
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2025-30218
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.