Skip to content

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

LowCVSS 1.7 EPSS 0.71%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial

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.

Upgrade path

2 packages: 1 fixed.

PackageAffectedFixed inStatus
npm next(npm) = 12.3.5; = 13.5.9; = 14.2.25; = 15.2.3 +4 more 12.3.6, 13.5.10, 14.2.26, 15.2.4 Fixed
vercel next.js = 12.3.5; = 13.5.9; = 14.2.25; = 15.2.3 +4 more No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
npm next(npm) = 12.3.5 No fix listed
npm next(npm) = 13.5.9 No fix listed
npm next(npm) = 14.2.25 No fix listed
npm next(npm) = 15.2.3 No fix listed
vercel next.js = = 12.3.5 No fix listed
vercel next.js = = 13.5.9 No fix listed
vercel next.js = = 14.2.25 No fix listed
vercel next.js = = 15.2.3 No fix listed
vercel next.js = 12.3.5 No fix listed
vercel next.js = 13.5.9 No fix listed
vercel next.js = 14.2.25 No fix listed
vercel next.js = 15.2.3 No fix listed
npm next(npm) >= 12.3.5, < 12.3.6 12.3.6
npm next(npm) >= 13.5.9, < 13.5.10 13.5.10
npm next(npm) >= 14.2.25, < 14.2.26 14.2.26
npm next(npm) >= 15.2.3, < 15.2.4 15.2.4

References