Next.js Middleware SubreqID Header Leak (Fix 12.3.6,13.5.10,14.2.26,15.2.4)
CVE-2025-30218 Published on April 2, 2025

Next.js may leak x-middleware-subrequest-id to external hosts
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.

Github Repository Vendor Advisory NVD

Vulnerability Analysis

CVE-2025-30218 is exploitable with network access, and does not require authorization privileges or user interaction. This vulnerability is consided to have a high level of attack complexity. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality and integrity and availability.

Exploitation:
NONE
Automatable:
NO
Technical Impact:
PARTIAL
Attack Vector:
NETWORK
Attack Complexity:
HIGH
Privileges Required:
NONE
User Interaction:
NONE

Weakness Type

What is an Information Disclosure Vulnerability?

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.

CVE-2025-30218 has been classified to as an Information Disclosure vulnerability or weakness.


Products Associated with CVE-2025-30218

Want to know whenever a new CVE is published for Vercel Next Js? stack.watch will email you.

Affected Versions

vercel next.js:

Vulnerable Packages

The following package name and versions may be associated with CVE-2025-30218

Package Manager Vulnerable Package Versions Fixed In
npm next = 12.3.5 12.3.6
npm next = 13.5.9 13.5.10
npm next = 14.2.25 14.2.26
npm next = 15.2.3 15.2.4

Exploit Probability

EPSS
0.43%
Percentile
38.12%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.