Origin Validation Error Affecting undici package, versions >=7.0.0 <7.30.2>=8.0.0 <8.12.4


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.15% (4th 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-UNDICI-22291066
  • published8 Nov 2026
  • disclosed6 Nov 2026
  • creditshirabe0x05, ffasterss

Introduced: 6 Nov 2026

NewCVE-2026-116630  (opens in a new tab)
CWE-346  (opens in a new tab)

How to fix?

Upgrade undici to version 7.30.2, 8.12.4 or higher.

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Origin Validation Error via the cache interceptor in lib/interceptor/cache.js when an Agent composes the redirect and shared cache interceptors as compose(redirect(), cache()). The redirect handler strips origin-bound credential headers from a conditional revalidation request but does not strip the cache-generated If-None-Match or If-Modified-Since validators, so when the original origin redirects the revalidation request to a different origin, the redirect destination receives the original origin's validators. undici then treats a 304 Not Modified response from that different origin as successful revalidation of the stored representation, allowing a shared cache to serve the original origin's authenticated response - including one gated by Authorization - to a subsequent unauthenticated caller.

Note: This is only exploitable when a shared MemoryCacheStore or SqliteCacheStore and the composition compose(redirect(), cache()) are used, and an attacker can influence a cross-origin redirect on the revalidated request.

Workaround

Compose the interceptors as compose(cache(), redirect()), use per-origin dispatchers and cache stores, or disable shared caching on redirect-capable requests.

CVSS Base Scores

version 4.0
version 3.1