CVE-2025-30218
published 2025-04-02CVE-2025-30218: 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…
PriorityP431medium5.9CVSS 3.1
AVNACHPRNUINSUCHINAN
EPSS
0.37%
28.9th percentile
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
8 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| next | next | >= 12.3.5 < 12.3.6 | 12.3.6 |
| next | next | >= 13.5.9 < 13.5.10 | 13.5.10 |
| next | next | >= 14.2.25 < 14.2.26 | 14.2.26 |
| next | next | >= 15.2.3 < 15.2.4 | 15.2.4 |
| vercel | next.js | — | — |
| vercel | next.js | — | — |
| vercel | next.js | — | — |
| vercel | next.js | — | — |
CVSS provenance
nvdv3.15.9MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
nvdv4.01.7LOWCVSS: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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
ghsa9.1CRITICAL
osv9.1CRITICAL
vendor_redhat9.1CRITICAL
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Red Hat
next.js: Next.js may leak x-middleware-subrequest-id to external hosts
vendor_redhat·2025-04-02·CVSS 9.1
CVE-2025-30218 [CRITICAL] CWE-200 next.js: Next.js may leak x-middleware-subrequest-id to external hosts
next.js: 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.
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
OSV
Next.js may leak x-middleware-subrequest-id to external hosts
osv·2025-04-02·CVSS 9.1
CVE-2025-30218 [CRITICAL] Next.js may leak x-middleware-subrequest-id to external hosts
Next.js may leak x-middleware-subrequest-id to external hosts
## Summary
In the process of remediating [CVE-2025-29927](https://github.com/advisories/GHSA-f82v-jwr5-mffw), we looked at other possible exploits of Middleware. We independently verified this low severity vulnerability in parallel with two reports from independent researchers.
Learn more [here](https://vercel.com/changelog/cve-2025-30218-5DREmEH765PoeAsrNNQj3O).
## Credit
Thank you to Jinseo Kim [kjsman](https://hackerone.com/kjsman?type=user) and [RyotaK](https://hackerone.com/ryotak?type=user) (GMO Flatt Security Inc.) with [takumi-san.ai](https://takumi-san.ai) for the responsible disclosure. These researchers were awarded as part of our bug bounty program.
GHSA
Next.js may leak x-middleware-subrequest-id to external hosts
ghsa·2025-04-02·CVSS 9.1
CVE-2025-30218 [CRITICAL] CWE-200 Next.js may leak x-middleware-subrequest-id to external hosts
Next.js may leak x-middleware-subrequest-id to external hosts
## Summary
In the process of remediating [CVE-2025-29927](https://github.com/advisories/GHSA-f82v-jwr5-mffw), we looked at other possible exploits of Middleware. We independently verified this low severity vulnerability in parallel with two reports from independent researchers.
Learn more [here](https://vercel.com/changelog/cve-2025-30218-5DREmEH765PoeAsrNNQj3O).
## Credit
Thank you to Jinseo Kim [kjsman](https://hackerone.com/kjsman?type=user) and [RyotaK](https://hackerone.com/ryotak?type=user) (GMO Flatt Security Inc.) with [takumi-san.ai](https://takumi-san.ai) for the responsible disclosure. These researchers were awarded as part of our bug bounty program.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
2025-04-02
Published