Next.js Cache Components Leaked Across Tenants

On November 3, 2026 Vercel shipped the November Next.js security release: seven advisories, one High and six Medium, fully patched in 16.4.5 (Active LTS) and partially in 15.5.29 (Maintenance LTS). The notable thing about this batch is not the count. It is that four of the seven trace back to a single cause — the cache key did not carry everything that distinguishes the request.

The problem: the cache became an authorization boundary

With Next.js 16, caching moved from implicit framework behavior to something you declare yourself through use cache and the cacheComponents option. That clarity is a real gain, but it relocates a responsibility into the application layer: the cache key now decides who sees what.

Per the official documentation, a cached entry's key is built from the build ID, a function ID (a secure hash of the function's location and signature), and its serializable arguments. Variables captured from an outer scope are bound in automatically and become part of the key. A root parameter, however, only enters the key if the function actually reads it.

That is where the gap opens. If a cached function reads a tenant identifier from a root parameter, and that same function is also called from inside unstable_cache, the outer wrapper carries its own key — and that key does not include the root parameter. During a cold cache fill, a concurrent call can receive another request's result without any check, and that result is then stored and served to every later caller with matching arguments until it is revalidated or evicted.

What changed in this batch

The High advisory (GHSA-mfr8-8qww-v76h) is exactly that scenario: cross-tenant cache disclosure when unstable_cache and use cache are combined. Three more belong to the same family:

  • Cross-root-parameter disclosure in nested use cache functions, where the outer entry is stored before the inner function's root-parameter dependencies have been recorded.
  • A cache identity collision in which distinct binary arguments produce the same key, so one user can receive another's result.
  • Shared shell cache poisoning on self-hosted apps running next start with Cache Components enabled and Partial Prefetching disabled.

Three advisories sit outside the cache theme: cross-client response injection via compression framing that no longer matches the body, behind an HTTP/1.1 reverse proxy; cookie exposure through an internal header on Edge routes that defeats HttpOnly; and an SVG rejection bypass in image optimization where a file is misclassified as AVIF.

The practical pattern

The fix is not a local patch but a rule: anything that distinguishes a request must reach the cached function as an explicit argument.

ts
// Fragile shape: the tenant is read inside the cached scope,
// and the outer wrapper does not carry it in its key.
export async function getMonthlyTotals() {
  'use cache'
  const tenant = await readTenantFromRootParams()
  return db.orders.aggregate({ where: { tenant } })
}

export const cachedTotals = unstable_cache(getMonthlyTotals, ['totals'])
ts
// Durable shape: the tenant is an argument, so it is part of
// the key on every call path.
import { cacheLife, cacheTag } from 'next/cache'

export async function getMonthlyTotals(tenant: string) {
  'use cache'
  cacheLife('minutes')
  cacheTag(`totals:${tenant}`)

  return db.orders.aggregate({
    where: { tenant },
    _sum: { amount: true },
  })
}

The page reads the value outside the cached scope and passes it down:

tsx
export default async function Page({ params }) {
  const { tenant } = await params
  return <Totals data={await getMonthlyTotals(tenant)} />
}

Real-world caveats

  • 15.5.29 closes only three of the seven. Full coverage lives in 16.4.5 alone.
  • Two advisories are conditional on self-hosting: shell poisoning needs next start, and response injection needs a proxy with specific pipelining behavior. A condition is not safety — it means the audit starts with your own configuration.
  • Upgrading does not replace review. Existing cache entries may already hold mixed data, and a new deployment changes the build ID so old keys fall away. That invalidation is part of the remedy, not a side effect.
  • use cache cannot reach cookies(), headers() or searchParams by design. Read them outside the scope and pass them in as arguments. That is not a limitation to work around — it is the boundary itself.

Takeaway

This release is less a list of separate bugs than an architectural lesson: once caching becomes explicit, its key becomes part of the permission model. The practical audit collapses into one question per cached function — is everything that distinguishes this request present in the key?

Primary source: Next.js November 2026 Security Release. For context on how this scheduled cadence began, see the first scheduled security release in July 2026.

Next.js Cache Components Leaked Across Tenants · bahashwan.dev