CVE-2025-30218
next.js: Next.js may leak x-middleware-subrequest-id to external hosts
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 3, 2025
Updated · June 30, 2026
Description
A flaw was found in the Next.js package. 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.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
CVSS / CWE
CVSS 3.1 · 3.7CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
CWE-200 · Exposure of Sensitive Information to an Unauthorized Actor