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.

Severity (CVSS 4.0)1.7Low
Exploit odds (30 days)0.4%top 62.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
npmnext12.3.6GHSA-223j-4rm8-mrmf
npmnext13.5.10GHSA-223j-4rm8-mrmf
npmnext14.2.26GHSA-223j-4rm8-mrmf
npmnext15.2.4GHSA-223j-4rm8-mrmf

Affected products (as reported)

VendorProductVersions
vercel next.js = 12.3.5= 13.5.9= 14.2.25= 15.2.3

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