CVE-2026-119790: Next.js: Information disclosure across root params when a 'use cache' function is called through unstable_cache()
Next.js is a React framework for building full-stack web applications. From 16.3.0 until 16.4.5, Next.js applications using the same 'use cache' function directly during rendering and through unstablecache() can disclose cached data across root params when that function reads a root param. During the first fill after a cold process start, cross-request deduplication allows a concurrent unstablecache() request to join the direct call's in-flight fill and receive its result before the root param mismatch is rejected. unstablecache() then persists that result under a key that omits root params, causing later requests for other root param values to receive the same entry until revalidation or eviction. Exploitation requires the unstablecache() request to arrive while the first fill is in flight. Outside this race, nesting 'use cache' inside unstablecache() raises an unsupported-operation error, and avoiding that nesting prevents the issue. This issue is fixed in version 16.4.5.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 16.4.5 - Compensating control
Avoid nesting a 'use cache' function inside unstable_cache(); do not call the same function through unstable_cache() when it is also used directly during rendering.
Event History
Frequently Asked Questions
Which applications are affected?
Affected applications use Next.js from 16.3.0 through 16.4.5 and invoke the same 'use cache' function both directly during rendering and through unstable_cache(), where that function reads a root param. Applications that avoid this nesting are not affected by this issue.
What conditions are required for data disclosure?
A request using unstable_cache() must arrive concurrently while the first direct-rendering cache fill after a cold process start is still in flight. The race allows unstable_cache() to persist a result under a key that omits root params, so later requests with different root param values can receive that cached result.
What can be done before updating?
Avoid calling a 'use cache' function through unstable_cache() when that function is also called directly during rendering and reads a root param. Outside the race, this nesting produces an unsupported-operation error; removing the nesting prevents the issue.
How long can incorrectly shared data remain available?
The incorrectly persisted unstable_cache() entry can be returned for other root param values until it is revalidated or evicted.