Next.js: HttpOnly cookie exposure through internal response header on Next.js Edge runtime routes
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| npmnext |
< 16.4.5→ 16.4.5 |
16.4.5 |
| npmnext |
>= 15.0.0, <= 15.5.28→ Not listed |
Not listed |
| vercelnext.js | — | Not listed |
Original description The description as published by the source.
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.
Source: GitHub Repository Security Advisories (Game のスタック) NVD GitHub Advisory
References
- advisory github.com
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web nextjs.org
- web nvd.nist.gov
- web github.com