CVE-2026-103004 in Next.jsinfo

Summary

by MITRE • 10/01/2026

Next.js versions from 16.3.0 to 16.3.7 warm `use cache` handlers using `next/root-params` and can leak their return value to pages with different root params. With Cache Components enabled (cacheComponents: true), a 'use cache' function that calls another 'use cache' function that reads a root param can be keyed incorrectly when the inner call is served from an existing entry: the enclosing function's cache key then omits that root param. The enclosing 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 — whether the page is prerendered at build time or at runtime, or rendered dynamically. Shared cache headers let downstream caches redistribute the content further.

What values are leaked cannot be attacker controlled. Which value's content is served depends only on which invocation wrote the entry first.

This has been patched in 16.3.8.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 10/01/2026

The vulnerability identified in Next.js versions ranging from 16.3.0 to 16.3.7 represents a critical flaw within the framework's server-side caching mechanism, specifically affecting components utilizing the experimental use cache directive when combined with root parameters and nested cached functions. This issue arises under specific conditions where Cache Components are enabled via the configuration flag cacheComponents set to true. The core technical failure lies in how the system generates cache keys for these specialized handlers. When a function marked as use cache invokes another function also marked as use cache, and that inner function reads from root parameters such as next/root-params, the caching logic fails to correctly incorporate those root parameter values into the final cache key of the enclosing outer function if the inner call is served from an existing cached entry rather than being recomputed. Consequently, the resulting cache key for the outer function omits the variable root param data that should distinguish it from other invocations with different parameters.

This incorrect key generation leads to a severe information leakage scenario where responses intended for one set of root parameter values are incorrectly served to requests containing different root parameter values. Because the enclosing entry is written only once based on whichever invocation happens to execute first, subsequent requests with varying root params will retrieve this stale and contextually inappropriate cached response. This behavior persists regardless of whether the page rendering occurs at build time through static generation or dynamically at runtime during request processing. The impact is further exacerbated by shared cache headers that may be attached to these responses, allowing downstream caching proxies such as CDNs or reverse proxies to redistribute the misattributed content across a wider network, thereby amplifying the scope of the data exposure beyond the immediate server instance.

From an industry standard perspective, this vulnerability aligns with CWE-209: Generation of Error Message Containing Sensitive Information and CWE-359: Exposure of Private Personal Information to an Unauthorized Actor, as it results in the unintended disclosure of content associated with specific user contexts or data segments. In terms of attack vectors, this flaw can be mapped to ATT&CK technique T1078: Valid Accounts if exploited through session-based root parameters, or more broadly under information leakage patterns where application logic fails to properly isolate state between distinct request contexts. The severity is heightened by the fact that while an attacker cannot directly control which specific values are leaked, they can influence the timing of requests to potentially trigger the retrieval of sensitive data belonging to other users if those users' requests were processed first and cached before the attacker's request arrives.

Mitigation strategies primarily involve upgrading the Next.js framework to version 16.3.8 or later where this caching logic has been corrected to ensure that root parameters are always included in cache keys for use cache handlers, thereby maintaining proper isolation between different parameter contexts. For environments unable to upgrade immediately, developers should consider disabling Cache Components by setting cacheComponents to false if the performance benefits do not outweigh the security risks associated with their specific application architecture. Additionally, implementing strict cache control headers that prevent downstream caching of dynamic content containing user-specific or context-dependent data can provide a secondary layer of defense against the redistribution of misattributed responses via shared caches. Regular auditing of server-side rendering logic and cached component interactions is recommended to ensure compliance with secure coding practices regarding state isolation and key generation integrity.

Responsible

GitHub M

Reservation

09/29/2026

Disclosure

10/01/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!