CVE-2026-109829: undici vulnerable to cache poisoning and cross-user disclosure via cross-origin redirects
undici 7.x and 8.x can store a cross-origin redirect response under the original URL's cache key. This happens when an originless `Agent` uses `compose(redirect(), cache())` with a shared cache. An attacker who controls a redirect target can poison a trusted URL, and private responses can leak to later callers. Fixed in undici 7.30.1 and 8.12.2.
Published Oct 27, 2026 · Analysis Nov 1, 2026
What an attacker can do
The cache interceptor builds its key from the original request URL, before the redirect handler changes the origin. The final response, which may come from another origin, is then saved under the original key.
Two outcomes follow. First, if an attacker controls the target of a redirect from a trusted URL, their body is cached under the trusted URL. Later callers get it from the shared cache with no request to either origin, so the poisoning persists. Second, when an authenticated request gets a private, no-store redirect to a user-specific resource, the final response is stored under the original URL. A later unauthenticated caller can receive it.
Exposure needs three things together: an originless Agent, a shared MemoryCacheStore or SqliteCacheStore with type: 'shared', and the order compose(redirect(), cache()). The CVSS vector sets attack complexity high for that reason. Origin-bound Client and Pool dispatchers are not affected, nor is the reverse order.
Who is affected
undici from 7.0.0 before 7.30.1 and from 8.0.0 before 8.12.2. The cache interceptor arrived in 7.0.0, so 6.x is not affected by this issue. Check the version:
npm ls undiciThen search your code for compose(redirect(), cache()) combined with type: 'shared'. If your code uses compose(cache(), redirect()) or per-origin dispatchers, it is outside the affected setup.
undici
- Ecosystem
- npm
- Affected
- >= 7.0.0, < 7.30.1
- Fixed in
- 7.30.1
- Check
npm ls undici
undici
- Ecosystem
- npm
- Affected
- >= 8.0.0, < 8.12.2
- Fixed in
- 8.12.2
- Check
npm ls undici
How to fix it
Upgrade to undici 7.30.1 or 8.12.2:
npm install [email protected]Before storing a response, undici now checks that the origin that produced it matches the cache key. It also keeps each redirect hop's cache-control policy, so cross-origin and no-store or private hops are not cached under the original key.
Workarounds from the advisory: compose as compose(cache(), redirect()), use per-origin dispatchers and cache stores, or disable shared caching on redirect-capable requests.
How to tell if you were hit
No indicators are published. Stale or wrong content returned for a trusted URL without any outbound request to its origin is the symptom. In a SqliteCacheStore, inspect cached entries for URLs whose stored response came from a redirect. For a MemoryCacheStore, restart the process to clear it after patching. Review code for the vulnerable composition and a shared cache.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
When an originless Agent composes the redirect and cache interceptors as compose(redirect(), cache()) with a shared cache (type: 'shared'), the cache builds its key from the original request URL before the redirect handler changes the origin. The response produced after a redirect is then stored under the original key, even when the redirect crossed to a different origin.
An attacker who controls the target of a redirect from a trusted URL can have their response cached under that trusted URL. A later caller requesting the trusted URL receives the attacker's body from the shared cache without either origin being contacted, allowing persistent cache poisoning. The same key confusion also discloses private data: when an authenticated request returns a private, no-store redirect to a user-specific resource, the final response is stored under the original URL and can be served to a later unauthenticated caller.
The cache interceptor was introduced in undici 7.0.0, and all 7.x and 8.x releases before the patched versions are affected. Applications are affected only when an originless Agent, a shared MemoryCacheStore or SqliteCacheStore, and the composition compose(redirect(), cache()) are all used. Origin-bound Client and Pool dispatchers, and the reverse composition compose(cache(), redirect()), are not affected.
Patches
Upgrade to 7.30.1 or 8.12.2. Before storing a response, undici now verifies that the origin that produced it still matches the cache key, and preserves each redirect hop's cache-control policy, so cross-origin redirect responses and responses behind a no-store or private hop are no longer cached under the original key.
Workarounds
Compose the interceptors as compose(cache(), redirect()), use per-origin dispatchers and cache stores, or disable shared caching on redirect-capable requests.
Credited to Kushalkhemka, mayank-jangid-moon, skigeek16, opensec-intelligence, bengsky13, mcollina, UlisesGascon.
Questions
- Does using undici's fetch alone expose me?
Not by itself. The advisory requires an originless
Agent, a sharedMemoryCacheStoreorSqliteCacheStore, and the compositioncompose(redirect(), cache())all at once.- Is undici 6.x affected by CVE-2026-109829?
No. The cache interceptor was introduced in 7.0.0, and the affected ranges are 7.0.0 up to 7.30.1 and 8.0.0 up to 8.12.2.
- Is there a workaround if I cannot upgrade?
Yes. Compose the interceptors as
compose(cache(), redirect()), use per-origin dispatchers and cache stores, or disable shared caching on redirect-capable requests.
References
Read for this analysis:
- https://nvd.nist.gov/vuln/detail/CVE-2026-109829
- https://github.com/nodejs/undici/commit/26c2bfb3def0b67241ce878e80657ed5d6c3efa8
- https://github.com/nodejs/undici/commit/b20b82ad80a405a12b6ce1f341bcd418de390aa0
- https://cna.openjsf.org/security-advisories.html
- https://github.com/nodejs/undici/releases/tag/v7.30.1
- https://github.com/nodejs/undici/releases/tag/v8.12.2
- https://github.com/advisories/GHSA-4w7w-5xrc-9h26
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 entriesCVE-2026-109383
undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent
high7.4Oct 27, 2026CVE-2026-109855
undici WebSocket client vulnerable to Denial of Service via failed HTTP/2 handshake
high7.5Oct 27, 2026CVE-2026-109932
undici WebSocket client vulnerable to Denial of Service via unbounded automatic PONG buffering
medium5.9Oct 27, 2026CVE-2026-87018
undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation
high7.5Oct 27, 2026CVE-2026-87029
undici vulnerable to Denial of Service via unhandled exception in the decompress interceptor
medium5.9Oct 27, 2026CVE-2026-109841
undici vulnerable to Subresource Integrity bypass via non-lowercase algorithm tokens
medium5.9Oct 23, 2026
