MEDIUM · CVSS 4.0 EPSS 0.5% · 35th percentile CWE-200CWE-201

CVE-2026-119346: Next.js: HttpOnly cookie exposure through internal response header on Next.js Edge runtime routes

Published 2026-11-19 · Updated 2026-11-19 · Also known as GHSA-f3mh-rxg3-f5g2

Summary

Next.js Edge runtime routes incorrectly expose HttpOnly cookies in a public response header, allowing client-side scripts to access sensitive session tokens. Developers using Next.js versions 15.0.0 through 15.5.28 or 16.0.0 through 16.4.4 must upgrade to the latest versions to secure their cookie management.

Who is affected

The vulnerability affects Next.js applications utilizing the Edge runtime for App Router route handlers and Pages Router API routes. When an application sets a sensitive HttpOnly cookie on these routes, the internal 'x-middleware-set-cookie' header is leaked in the public response. This enables JavaScript running on the same origin to read potentially protected session tokens.

Exploitability

The vulnerability requires network access and relies on user interaction or specific application response conditions, as indicated by the CVSS 4.0 vector. With an EPSS score of 0.003, the likelihood of exploitation is low, and the issue is not currently listed in the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
npm next >= 15.0.0, < 15.5.29 15.5.29 npm install [email protected]
npm next >= 16.0.0, < 16.4.5 16.4.5 npm install [email protected]

Tracked tools affected

Next.js · Next.js security advisories · Fixed in Next.js 15.5.29 release notes · Fixed in Next.js 16.4.5 release notes

CVSS 4.0 vector

CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Attack vectorNetwork
Attack complexityHigh
Attack requirementsNone
Privileges requiredNone
User interactionPassive
Confidentiality (vulnerable system)High
Integrity (vulnerable system)None
Availability (vulnerable system)None
Confidentiality (subsequent systems)None
Integrity (subsequent systems)None
Availability (subsequent systems)None

Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.

FAQ

What specifically causes this vulnerability?

It is caused by the internal 'x-middleware-set-cookie' header being duplicated into the public response when using NextResponse on Edge runtime routes.

Does this vulnerability affect all Next.js deployments?

No, it specifically affects routes using the Edge runtime, including App Router route handlers and Pages Router Edge API routes.

Is this issue currently being exploited in the wild?

There is no record of active exploitation as the vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities catalog.

Original advisory description
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.

References

Source records: GHSA-f3mh-rxg3-f5g2 (OSV.dev) · EPSS by FIRST, 2026-11-26.