Vulnerability · Published Apr 2, 2025 · Assigned by GitHub_M
CVE-2025-30218Next.js may leak x-middleware-subrequest-id to external hosts
Low 1.7
In plain English
A low-severity information exposure in next.js from vercel. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 38% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | next | 12.3.6 | GHSA-223j-4rm8-mrmf |
| npm | next | 13.5.10 | GHSA-223j-4rm8-mrmf |
| npm | next | 14.2.26 | GHSA-223j-4rm8-mrmf |
| npm | next | 15.2.4 | GHSA-223j-4rm8-mrmf |
Affected products (as reported)
Weakness: CWE-200 · Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U
References
- https://github.com/vercel/next.js/security/advisories/GHSA-223j-4rm8-mrmf x_refsource_CONFIRM
- https://vercel.com/changelog/cve-2025-30218-5DREmEH765PoeAsrNNQj3O x_refsource_MISC