CVE-2025-30218: Next.js may leak x-middleware-subrequest-id to external hosts

Published Apr 2, 2025
·
Updated

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.

Other sources

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.

MITRE

Affected Software

9 affected componentsFixes available
Vercel Next.js<12.3.6, <13.5.10, <14.2.26, <15.2.4
npm/next=15.2.3
15.2.4
npm/next=14.2.25
14.2.26
npm/next=13.5.9
13.5.10
npm/next=12.3.5
12.3.6
Vercel Next.js Node.js=12.3.5
Vercel Next.js Node.js=13.5.9
Vercel Next.js Node.js=14.2.25
Vercel Next.js Node.js=15.2.3

Event History

Apr 2, 2025
CVE Published
via MITRE·09:23 PM
Data Sourced
via MITRE·09:23 PM
DescriptionWeakness
Data Sourced
via NVD·10:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
Affected Software
Advisory Published
via GitHub·10:35 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-30218?

CVE-2025-30218 is classified as a low severity vulnerability.

2

How do I fix CVE-2025-30218?

To remediate CVE-2025-30218, upgrade to Next.js version 15.2.4, 14.2.26, 13.5.10, or 12.3.6.

3

Which versions of Next.js are affected by CVE-2025-30218?

CVE-2025-30218 affects Next.js versions prior to 15.2.4, 14.2.26, 13.5.10, and 12.3.6.

4

Who reported CVE-2025-30218?

CVE-2025-30218 was independently verified based on reports from multiple independent researchers.

5

Is CVE-2025-30218 related to another vulnerability?

Yes, CVE-2025-30218 is related to CVE-2025-29927 as part of a broader review of Middleware vulnerabilities.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203