NetSight
medium6.0

CVE-2026-119346

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

Impact

Next.js applications that set cookies through `NextResponse` on Edge runtime routes — App Router route handlers and Pages Router Edge API routes — send an internal `x-middleware-set-cookie` header in the public response, duplicating the cookie value and its attributes. This makes HttpOnly cookies, such as session tokens, readable by JavaScript running on the same origin when an application sets a sensitive cookie on an affected response.

An attacker can exploit this over the network, without logging in, but a user has to be involved, for example by viewing content. Specific conditions have to be met, which makes an attack harder. If it succeeds: high risk of data being read.

Affected packages

EcosystemPackageAffectedFixed in
npmnext>= 15.0.0, <= 15.5.2815.5.29

Affected products · Vercel

ProductAffected versions
Next.js
from 16.0.0, before 16.4.5
from 15.0.0, before 15.5.29

Weakness classification

References