Dev News Daily ENDE

Two Next.js 'use cache' flaws can serve one locale's cached data to another

Two advisories published in the GitHub Advisory Database on 16 and 17 November describe ways in which Next.js applications using Cache Components can store a cache entry under a key that omits a root param - the route parameters of the root layout, which applications commonly use to scope data, for example per locale. Both are rated medium and fixed in Next.js 16.4.5.

CVE-2026-119351 (GHSA-vc7v-qv4w-wrv8, affecting 16.2.0 to 16.4.4) concerns nested 'use cache' functions. If an inner function reads a root param and returns a value that still contains pending promises, React Flight can deliver the ready part to the outer function before the inner entry has published its root param dependencies. The outer entry is then persisted under a key without that param and reused for every value, and it can also ignore tag invalidation and the cache lifetimes of the nested caches. The advisory says the leaked values cannot be attacker-controlled; which content is served depends on which invocation wrote the entry first. It is a variant that the fix for an earlier advisory, GHSA-h694-7cp9-m8p3, did not cover.

CVE-2026-119790 (GHSA-mfr8-8qww-v76h, affecting 16.3.0 to 16.4.4) applies when the same 'use cache' function is called both directly and through unstable_cache(). During a cold process start, a deduplication race let the unstable_cache() call join the in-flight fill of the direct call and bypass the root param check; the result was stored without root params and served to other values until revalidated or evicted. Outside that race the nesting already throws "'use cache' inside unstable_cache() is unsupported", and avoiding it is a complete workaround.

Two Next.js 'use cache' flaws can serve one locale's cached data to another
Two Next.js 'use cache' flaws can serve one locale's cached data to another — Dev News Daily

Why it matters

Neither flaw lets an attacker choose what leaks, but both break the assumption that a per-locale or per-tenant root param keeps cached data apart. Applications that scope data that way should move to 16.4.5.

Primary source
GitHub Advisory Database
https://github.com/advisories/GHSA-vc7v-qv4w-wrv8