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

Medium

OSV id
GHSA-f3mh-rxg3-f5g2
Also known as
CVE-2026-119346
Published
Last modified

Affected packages

PackageAffected versionsFixed in
next
npm
>= 15.0.0, < 15.5.29 15.5.29
next
npm
>= 16.0.0, < 16.4.5 16.4.5

How to fix it

next (npm)

Upgrade next to 15.5.29 or later.

npm install next@15.5.29
# if it is an indirect dependency: npm update next (or npm audit fix)
  • If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
  • Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.

next (npm)

Upgrade next to 16.4.5 or later.

npm install next@16.4.5
# if it is an indirect dependency: npm update next (or npm audit fix)
  • If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
  • Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.

Not sure whether your project uses an affected version? Check your lockfile below for free.

Details

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

Am I affected?

Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.

or paste its content

Needed when you paste. package.json and pyproject.toml only have version ranges: use the lockfile next to them.

Only package names and versions are checked; the file itself is not kept. We use your email to send this report and nothing else unless you tick the box above. Privacy policy.

About this data

Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.