Next.js ships patches for 7 security issues in v16.4.5 and v15.5.29
Brief
Next.js published a security release in v16.4.5 (Active LTS) and v15.5.29 (Maintenance LTS) addressing seven vulnerabilities, one rated high severity.
Patched versions
npm install next@16.4.5for the 16.x line;npm install next@15.5.29for 15.5.- Next.js asks users to patch their Next.js dependencies to keep applications secure.
High severity: cross-tenant cache disclosure
- GHSA-mfr8-8qww-v76h: with Cache Components enabled, cached content can leak across root-parameter values when the same public
use cachefunction is called directly and from insideunstable_cache. - The cached function must read a root parameter such as a tenant identifier. During a cold cache fill, a concurrent call through
unstable_cachecan receive another request's result without checking root parameters, and that result can then be served to later callers until revalidation or eviction.
Medium severity issues
- GHSA-vc7v-qv4w-wrv8: nested public
use cachefunctions can serve content generated for one root-parameter value to requests for another, disclosing tenant-, site- or locale-specific content. The app generates the reused content; attackers do not inject arbitrary content. - GHSA-rhh4-g77r-r9qj: distinct binary arguments to a
use cachefunction can produce the same cache identity, letting a caller receive another user's cached result or have their own result served to another user. - Self-hosted
next startapps with Cache Components enabled and Partial Prefetching disabled or unset can have a shared page shell poisoned by an unauthenticated request, causing incorrect server-rendered content or persistent 404s. - Self-hosted apps returning an attacker-controlled fetched Response unchanged can forward decompressed bytes with the original compressed framing headers; behind an HTTP/1.1 reverse proxy that queues pipelined requests on a shared backend connection, responses can be assigned to the wrong clients.
- App Router Edge Route Handlers and Pages Router Edge API routes using
NextResponse.cookies.set()can expose the serialized cookie in the internalx-middleware-set-cookieheader, readable by same-origin JavaScript even for HttpOnly cookies. Node.js Route Handlers andcookies().set()were not affected in the reproduced leak. - GHSA-7qx7-33qx-rqx2: an attacker-controlled image from a permitted source can be misclassified as AVIF and bypass
images.dangerouslyAllowSVG: false, reaching an SVG parser. The image-source allowlist still applies; no XSS or RCE was demonstrated.
Security program
- Next.js works with researchers through Vercel's Open Source Bug Bounty on HackerOne.
- Questions about security programs or vulnerability management go to security@vercel.com.
Generated by AI from the original article. Check the source for full details.