CVE-2026-119346

Next.js: HttpOnly cookie exposure through internal response header on Next.js Edge runtime routes

Medium published · updated · also known as GHSA-F3MH-RXG3-F5G2

6.0
CVSS score out of 10 · NVD (github.com)

Description

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 products and versions

Product / packageEcosystem / vendorVersionsFixed inSource
next npm >= 15.0.0, <= 15.5.2815.5.29 GitHub
next npm >= 16.0.0, <= 16.4.416.4.5 GitHub

References