Next.js: HttpOnly cookie exposure through internal response header on Next.js Edge runtime routes
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in next 15.5.29 and next 16.4.5.
Next.js is a React framework for building full-stack web applications. From 15.0.0 until 15.5.29 and 16.4.5, Next.js applications that use NextResponse to set cookies on Edge runtime routes expose the internal x-middleware-set-cookie header in the public response. This affects App Router route handlers and Pages Router Edge API routes. The header duplicates each cookie value and its attributes, so JavaScript already running on the same origin can read values that the Set-Cookie header marks HttpOnly, including sensitive session tokens set on an affected response. This issue is fixed in versions 16.4.5 and 15.5.29.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| vercel | >=15.0.0 <15.5.29, >=16.0.0 <16.4.5 | ||
| npm: next | >=15.0.0 <15.5.29, >=15.0.0 <=15.5.28, >=16.0.0 <16.4.5, >=16.0.0 <=16.4.4 | 15.5.29, 16.4.5 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in next (npm), strongest first
Embed
A live severity badge for an advisory, README or ticket