1.7low
Next.js may leak x-middleware-subrequest-id to external hosts
- Severity
- 1.7low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.43% (higher than 39% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-223j-4rm8-mrmf
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
| Product or package | Versions | Reported by |
|---|---|---|
| vercel next.js | = 12.3.5, = 13.5.9, = 14.2.25, = 15.2.3, 12.3.5, 13.5.9, 14.2.25, 15.2.3 | CVE List, NVD |
| next (npm) | from 12.3.5 before 12.3.6, from 13.5.9 before 13.5.10, from 14.2.25 before 14.2.26, from 15.2.3 before 15.2.4 | GitHub Advisory Database |
All scores
| GitHub_M | 1.7low CVSS:4.0 | 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 |
| GitHub | low CVSS:4.0 | 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 |
| NVD | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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 Advisory Database
Summary
In the process of remediating CVE-2025-29927, 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.
Credit
Thank you to Jinseo Kim kjsman and RyotaK (GMO Flatt Security Inc.) with takumi-san.ai for the responsible disclosure. These researchers were awarded as part of our bug bounty program.
NVD (es)
Next.js es un React framework para construir aplicaciones web de pila completa. Para mitigar CVE-2025-29927, Next.js validó el ID X-Middleware-subrequest que persistió en múltiples solicitudes entrantes. Sin embargo, esta ID de subrequest se envía a todas las solicitudes, incluso si el destino no es el mismo host que la aplicación Next.js. Iniciar una solicitud de recuperación a un tercero dentro de Middleware enviará el ID de subrequest de X-Middleware a ese tercero. Esta vulnerabilidad se fija en 12.3.6, 13.5.10, 14.2.26 y 15.2.4.
References
| https://github.com/vercel/next.js/security/advisories/GHSA-223j-4rm8-mrmf | vendor-advisory, web | |
| https://vercel.com/changelog/cve-2025-30218-5DREmEH765PoeAsrNNQj3O | vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-30218 | advisory | |
| https://github.com/vercel/next.js | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-30218 changed 2025-10-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-223j-4rm8-mrmf changed 2025-10-13 | CC-BY-4.0 |
| NVD | CVE-2025-30218 changed 2026-06-17 | Public domain |