Skip to content

Next.js patches seven bugs, including a HttpOnly cookie leak

Next.js 16.4.5 and 15.5.29 fix seven moderate-severity issues, the sharpest of which lets client-side JavaScript read HttpOnly session cookies on Edge runtime routes.

Vercel shipped its pre-announced November security release for Next.js on 3 November, patching seven moderate-severity vulnerabilities across versions 16.0.0 to 16.4.2 and 15.0.0 to 15.5.28. All seven were published as separate GitHub advisories the same day, credited to eps1lon.

The one worth reading closely is GHSA-f3mh-rxg3-f5g2. On Edge runtime route handlers, Next.js sets cookies through an internal x-middleware-set-cookie header that duplicates the cookie value into the public response. That header makes HttpOnly cookies, including session tokens, readable by client-side JavaScript on the same origin. The rest cover cache poisoning and information disclosure in use cache and unstable_cache(), a cache-poisoning route in Cache Components, an SVG rejection bypass in image optimisation, and response injection in self-hosted deployments that forward fetched responses.

Why it matters: if you set cookies on Edge runtime routes, upgrade to 16.4.5 or 15.5.29 now rather than on your usual patch cycle. A cookie marked HttpOnly is meant to be unreachable from JavaScript precisely to blunt XSS, and this bug quietly removed that protection for anyone on an affected version.

The caveat: every one of the seven is rated Moderate, not Critical, and Vercel has not said any are being exploited. The urgency here is the cookie bug’s specific mechanism, not the overall severity.

Share

Related reading

More from The Wire

All briefs