UNKNOWN npm

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

GHSA-f3mh-rxg3-f5g2 · CVE-2026-119346

Published · Modified

AI SAST

Find this class of vulnerability in your own code

Corgea's AI-native static analysis detects vulnerabilities like this one across your repositories, ranks them by exploitability, and returns review-ready fixes.

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.

Ready to move

Start Securing

Free, no credit card | First findings in minutes