NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-119790: Next.js: Information disclosure across root params when a 'use cache' function is called through unstable_cache()

mediumCVSS 4.0 6.3GHSA-mfr8-8qww-v76h

Next.js 16.3.0 through 16.4.4 can leak cached data between root param values, such as locales or tenants. It happens when one 'use cache' function runs both directly during rendering and through unstable_cache(), reads a root param, and the two calls race on a cold start. Upgrade to 16.4.5.

Published Nov 16, 2026 · Analysis Nov 17, 2026

What an attacker can do

Root params are route parameters of the root layout. Apps often use them to scope data, for example per locale or tenant. Normally unstable_cache() checks root params and rejects a 'use cache' function nested inside it. After a process start, a cross-request deduplication race can break that. An unstable_cache() call arrives while a direct call's first fill is still in flight. It joins that fill and receives the result, which skips the root param check.

unstable_cache() then stores the result under a cache key with no root params. Later requests for other root param values get the same entry until it is revalidated or evicted. Content built for one locale or tenant is served to the others.

The attacker cannot choose what leaks and needs only the ability to send requests. The timing window is narrow, which is why the CVSS vector marks attack complexity as low but attack requirements as present. Where root params separate tenants, the leaked content can belong to another tenant. The Next.js release post rates it high severity for that reason, while the advisory data says medium.

Who is affected

Next.js >= 16.3.0, <= 16.4.4 is affected. All of these must hold: Cache Components with 'use cache', a function that reads a root param, and that same function called both directly during rendering and through unstable_cache(). Check your version:

npm ls next

Search your code for unstable_cache( wrappers around functions marked 'use cache'. Outside the race, that nesting already throws 'use cache' inside unstable_cache() is unsupported.

next

Ecosystem
npm
Affected
>= 16.3.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 gives a complete workaround. Do not call a 'use cache' function through unstable_cache(). Call it directly, or use one caching mechanism for it.

After upgrading, restart the process. Consider purging cached entries written by the affected versions, since a poisoned entry stays until it is revalidated or evicted.

How to tell if you were hit

Look for pages that show content for the wrong locale or tenant, especially right after a deploy or restart. Search logs for the message 'use cache' inside unstable_cache() is unsupported. It shows where nesting exists in your code. Review your code for functions that read root params and appear both in a direct call and inside unstable_cache(). The advisory gives no other indicators.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Next.js applications with 'use cache' can disclose cached data across root params when the same 'use cache' function is called both directly during rendering and through unstable_cache(), and that function reads a root param. Root params are route parameters of the root layout, and applications commonly use them to scope data, for example per locale.

During a cold process start, a cross-request deduplication race allowed an unstable_cache() call to join the in-flight fill of a concurrent direct call and receive its result, bypassing the root param check that would normally reject it. unstable_cache() then stored that result under a cache key without root params, so subsequent requests for other root param values received the same entry until it is revalidated or evicted. Cached data produced for one root param value is returned to requests for other values.

Exploitation requires the unstable_cache() request to arrive while the function's first fill after a process start is still in flight. Outside this race, the nesting already throws an error: 'use cache' inside unstable_cache() is unsupported, and avoiding it is a complete workaround.

Questions

Is Next.js 16.2.x affected by CVE-2026-119790?

The advisory lists >= 16.3.0, <= 16.4.4 as vulnerable. Upgrade to 16.4.5 on the 16 line. The Next.js post also lists 15.5.29 for the 15 line.

Is there a workaround?

Yes. Stop calling a 'use cache' function through unstable_cache(). The advisory calls avoiding the nesting a complete workaround.

Can an attacker choose which data they get?

No. The leak is a race on a cold start. Which entry is stored and served depends on which request fills the cache first.

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 entries