CVE-2026-119351: Next.js: Cache leak across root param values in nested 'use cache' functions via delayed inner stream metadata
Next.js 16.2.0 through 16.4.4 can cache an outer 'use cache' function under a key that omits a root param. A response for one root param value, such as a tenant or locale, can then be served for another. It needs Cache Components and nested cached functions. Upgrade to 16.4.5. The severity is medium.
Published Nov 17, 2026 · Analysis Nov 17, 2026
What an attacker can do
With Cache Components on, an outer 'use cache' function can call an inner 'use cache' function that reads a root param through next/root-params. If the inner function returns an object with a ready value next to a slower pending promise, React Flight hands the ready part to the outer function early. The outer function can finish and write its cache entry before the inner entry has published its root param dependencies. The entry is stored under a key without that root param.
One entry then serves every root param value. Content generated for one tenant, site or locale can reach users of another. The entry can also ignore tag invalidation and the cache lifetimes of the nested caches it used.
An attacker cannot choose what leaks. Which value gets served depends on which invocation wrote the entry first. The attacker needs no special access beyond sending requests. This variant of GHSA-h694-7cp9-m8p3 is not covered by that advisory's fix. It does not need the inner call to come from an existing entry, and it does not need a slow cache handler.
Who is affected
Next.js >= 16.2.0, <= 16.4.4 is affected. The flaw applies only if Cache Components is enabled, an outer 'use cache' function calls an inner one that reads a root param, and the inner function returns a value with pending promises. Check your installed version:
npm ls nextSites where root params separate tenants, sites or locales carry the most risk. The advisory names no affected 15.x release.
next
- Ecosystem
- npm
- Affected
- >= 16.2.0, <= 16.4.4
- Fixed in
- 16.4.5
- Check
npm ls next
How to fix it
Upgrade to next 16.4.5:
npm install [email protected]The Next.js November 2026 security release lists 16.4.5 for the 16 line. The advisory lists no workaround. Until you upgrade, you could review nested 'use cache' functions that read root params and return partly pending values, but no source recommends a specific change. After upgrading, consider purging cached entries written by the affected versions, since stored entries can still hold content from the wrong root param.
How to tell if you were hit
Look for pages that show content for the wrong tenant, site or locale. This can be intermittent, since it depends on which request filled the cache first. Compare responses for different root param values on the same routes. Audit your code for 'use cache' functions that call other 'use cache' functions which read next/root-params. Find the ones that return objects with unresolved promises. Check logs for stale content after a tag revalidation, since affected entries can ignore tag invalidation.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
With Cache Components enabled, an outer 'use cache' function can be keyed incorrectly even when its inner 'use cache' call generates a fresh entry. If the inner function reads a root param (via next/root-params) and returns a value that still contains pending promises — for example an object with data that is ready immediately alongside slower data — React Flight delivers the ready portion to the outer function before the inner entry has finished publishing its root param dependencies. The outer function can then finish, and its cache entry is persisted under a key that omits that root param. The entry is written once and reused for all root param values, so a response for one root param value can serve content produced for a different value. Entries written this way can also ignore tag invalidation and cache lifetimes of the nested caches they consumed.
What values are leaked cannot be attacker controlled. Which value's content is served depends only on which invocation wrote the entry first.
This is a variant of https://github.com/advisories/GHSA-h694-7cp9-m8p3 that the fix for that advisory does not cover: it does not require the inner call to be served from an existing entry, and it does not depend on a slow cache handler.
Questions
- Is Next.js 16.4.4 affected by CVE-2026-119351?
Yes, if Cache Components is enabled and you use nested
'use cache'functions that read a root param. The affected range is 16.2.0 through 16.4.4. Version 16.4.5 fixes it.- Can an attacker pick which data leaks?
No. The advisory says the leaked values cannot be attacker controlled. The first invocation to write the cache entry decides which value is served.
- Is this the same as the earlier root param cache advisory?
It is a variant of GHSA-h694-7cp9-m8p3 that the earlier fix does not cover. It does not need the inner call to come from an existing entry or a slow cache handler.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-119346
Next.js: HttpOnly cookie exposure through internal response header on Next.js Edge runtime routes
medium6.0Nov 19, 2026CVE-2026-119347
Next.js: SVG rejection bypass in the image optimization
medium6.9Nov 19, 2026CVE-2026-119348
Next.js: Cross-client response injection and disclosure in self-hosted Next.js applications forwarding fetched responses
medium6.3Nov 19, 2026CVE-2026-119349
Next.js: Cross-user cache disclosure and poisoning in Next.js use cache with binary arguments
medium6.3Nov 19, 2026CVE-2026-119350
Next.js: Cache poisoning of shared fallback shells in Cache Components via request-supplied placeholder route params
medium6.3Nov 19, 2026CVE-2026-119790
Next.js: Information disclosure across root params when a 'use cache' function is called through unstable_cache()
medium6.3Nov 16, 2026
