CVE-2026-119346: Next.js: HttpOnly cookie exposure through internal response header on Next.js Edge runtime routes
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 Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 15.5.29 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 16.4.5
Event History
Frequently Asked Questions
Which applications are exposed?
Applications are affected when they use NextResponse to set cookies on Edge runtime routes. The affected route types are App Router route handlers and Pages Router Edge API routes.
What does an attacker need to read the exposed cookie values?
JavaScript must already be running on the same origin as the affected application. It can read the publicly returned x-middleware-set-cookie header, including values for cookies marked HttpOnly.
How can I verify whether an endpoint is affected?
Inspect the public HTTP response from an Edge runtime route that sets cookies with NextResponse. An affected response includes x-middleware-set-cookie with duplicated cookie values and attributes.
What versions should be used to remediate the issue?
Upgrade Next.js to 15.5.29 or 16.4.5, which contain the fix. The affected range begins at 15.0.0 and includes affected releases before those fixes.