CVE-2026-119346

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

Published Nov 16, 2026 CVSS 4.0 · 6 Medium EPSS n/a KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability arises when Next.js applications use NextResponse to set cookies on Edge runtime routes. The framework mistakenly exposes the internal x-middleware-set-cookie header in the public response, duplicating each cookie value and its attributes. Consequently, JavaScript code running on the same origin can read values that were intended to be HttpOnly, such as session identifiers. This results in an information disclosure of sensitive authentication data.

Affected Systems

The flaw affects the Vercel Next.js framework, specifically versions 15.x before 15.5.29 and 16.x before 16.4.5. Applications using App Router route handlers or Pages Router Edge API routes that set cookies via NextResponse are susceptible.

Risk and Exploitability

The CVSS score of 6.0 indicates a medium severity vulnerability. The EPSS score is not available, and the issue is not listed in the CISA KEV catalog, suggesting limited evidence of exploitation to date. Nonetheless, an attacker who can execute or inject JavaScript on the same origin can read the exposed HttpOnly cookie values, potentially compromising user sessions. The exploit requires interaction with the affected Edge route and does not rely on remote code execution, but the disclosure of session tokens can lead to credential theft or elevated privileges within the application.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Next.js to version 15.5.29 or later, or 16.4.5 or newer.
  • Redeploy the application so that Edge runtime routes no longer expose the internal x‑middleware‑set‑cookie header.
  • Audit your code base to ensure no custom edge routes or middleware set cookies using NextResponse in a manner that could expose sensitive data.

Generated by OpenCVE AI on November 16, 2026 at 19:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Vercel
Vercel next.js
Vendors & Products Vercel
Vercel next.js
Type Values Removed Values Added
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.
Title Next.js: HttpOnly cookie exposure through internal response header on Next.js Edge runtime routes
Weaknesses CWE-200
CWE-201
References
Metrics cvssV4_0

{'score': 6, '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'}

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-201

    Insertion of Sensitive Information Into Sent Data

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 16, 2026, 6:41 PM
Reserved
Oct 29, 2026, 8:44 PM
Status
Awaiting Analysis
Published
Nov 16, 2026, 7:17 PM
Modified
Nov 16, 2026, 8:37 PM