Low severityNVD Advisory· Published Apr 2, 2025· Updated Oct 13, 2025
Next.js may leak x-middleware-subrequest-id to external hosts
CVE-2025-30218
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
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
nextnpm | >= 12.3.5, < 12.3.6 | 12.3.6 |
nextnpm | >= 13.5.9, < 13.5.10 | 13.5.10 |
nextnpm | >= 14.2.25, < 14.2.26 | 14.2.26 |
nextnpm | >= 15.2.3, < 15.2.4 | 15.2.4 |
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- github.com/advisories/GHSA-223j-4rm8-mrmfghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-30218ghsaADVISORY
- github.com/vercel/next.js/security/advisories/GHSA-223j-4rm8-mrmfghsax_refsource_CONFIRMWEB
- vercel.com/changelog/cve-2025-30218-5DREmEH765PoeAsrNNQj3Oghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.