Race Condition Affecting next package, versions >=16.3.0 <16.4.5


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.4% (36th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-NEXT-22606114
  • published19 Nov 2026
  • disclosed16 Nov 2026
  • creditUnknown

Introduced: 16 Nov 2026

NewCVE-2026-119790  (opens in a new tab)
CWE-362  (opens in a new tab)

How to fix?

Upgrade next to version 16.4.5 or higher.

Overview

next is a react framework.

Affected versions of this package are vulnerable to Race Condition via a cross-request deduplication race in use-cache-wrapper.ts when a 'use cache' function is called both directly during rendering and through unstable_cache(), and that function reads a root param. During a cold process start, an unstable_cache() call can 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 stores that result under a cache key without root params, so subsequent requests for other root param values receive the same cached entry until it is revalidated or evicted. Cached data produced for one root param value is thus returned to requests for other values.

Note: 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).

Workaround

Avoid calling the same 'use cache' function both directly during rendering and through unstable_cache(). Outside the race window, the nesting already throws an error, so ensuring 'use cache' functions are never nested inside unstable_cache() is a complete workaround.

CVSS Base Scores

version 4.0
version 3.1