Next.js: Information disclosure across root params when a 'use cache' function is called through unstable_cache()
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | next | >= 16.3.0, < 16.4.5 | 16.4.5 |
References
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N- Weakness (CWE)
CWE-362- Platform
- npm
- Package
next- Disclosed
- 16.11.2026
- Updated
- 16.11.2026 21:17
Sources and licenses
OSV / GitHub Advisory Database - GHSA-mfr8-8qww-v76h - CC BY 4.0
Vulnerability history: next
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 83
- First → latest
- 12.2017 11.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 6
- High 28
- Medium 40
- Low 9
Disclosures per year
- 2017: 1
- 2018: 2
- 2019: 0
- 2020: 3
- 2021: 3
- 2022: 3
- 2023: 1
- 2024: 6
- 2025: 14
- 2026: 50
-
Next.js: Information disclosure across root params when a 'use cache' function is called through unstable_cache() this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.