CVE-2025-30218
JSON

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 packageVersionsReported 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.3CVE 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.4GitHub Advisory Database

All scores

GitHub_M1.7low CVSS:4.0CVSS: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
GitHublow CVSS:4.0CVSS: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
NVD5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-200

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

Sources

SourceRecordLicence
CVE ListCVE-2025-30218 changed 2025-10-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-223j-4rm8-mrmf changed 2025-10-13CC-BY-4.0
NVDCVE-2025-30218 changed 2026-06-17Public domain