Packages / next / Security

ModerateVulnerabilityGHSA-f3mh-rxg3-f5g2CVE-2026-119346Published 19 Nov 2026

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

Your version

Affected releases · next

  • 16.x16.0.0 – 16.4.4Fixed in 16.4.5
  • 15.x15.0.0 – 15.5.28Fixed in 15.5.29

On 16.x, the newest line:

npm install next@16.4.5
Every release on a timeline
16.x
  1. Affected

    16.0.0 – 16.4.4

    47 releases

  2. Fixed

    16.4.5 – 16.4.6

    2 releases

15.x
  1. Affected

    15.0.0 – 15.5.28

    82 releases

  2. Fixed

    15.5.29

    1 release

428 stable releases of next, oldest to newest, one row per major.

What happens

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.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.