{"id":"CVE-2026-109829","aliases":["CVE-2026-109829","GHSA-4w7w-5xrc-9h26"],"related":[],"kind":"vulnerability","state":"published","title":"undici vulnerable to cache poisoning and cross-user disclosure via cross-origin redirects","summary":"undici is an HTTP client library for Node.js. In versions 7.0.0 through 7.30.0 and 8.0.0 through 8.12.1, when an originless Agent composes the redirect and cache interceptors in that order with a shared cache store, the cache builds its key from the original request URL before the redirect handler changes the origin, so a response produced after a cross-origin redirect is stored under the original key. An attacker who controls the target of a redirect from a trusted URL can have their response cached under that trusted URL and served to later callers, allowing persistent cache poisoning, and the same key confusion lets a private, non-stored redirect response to a user-specific resource be stored under the original URL and served to a later unauthenticated caller, disclosing private data. Applications are affected only when an originless Agent, a shared cache store, and the redirect-then-cache composition are all used. The issue is fixed in undici 7.30.1 and 8.12.2, which verify the producing origin still matches the cache key and preserve each redirect hop's cache-control policy before storing, and users should upgrade to one of those versions or later. As a workaround, compose the cache interceptor before the redirect interceptor, use per-origin dispatchers and cache stores, or disable shared caching on redirect-capable requests.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"undici is an HTTP client library for Node.js. In versions 7.0.0 through 7.30.0 and 8.0.0 through 8.12.1, when an originless Agent composes the redirect and cache interceptors in that order with a shared cache store, the cache builds its key from the original request URL before the redirect handler changes the origin, so a response produced after a cross-origin redirect is stored under the original key. An attacker who controls the target of a redirect from a trusted URL can have their response cached under that trusted URL and served to later callers, allowing persistent cache poisoning, and the same key confusion lets a private, non-stored redirect response to a user-specific resource be stored under the original URL and served to a later unauthenticated caller, disclosing private data. Applications are affected only when an originless Agent, a shared cache store, and the redirect-then-cache composition are all used. The issue is fixed in undici 7.30.1 and 8.12.2, which verify the producing origin still matches the cache key and preserve each redirect hop's cache-control policy before storing, and users should upgrade to one of those versions or later. As a workaround, compose the cache interceptor before the redirect interceptor, use per-origin dispatchers and cache stores, or disable shared caching on redirect-capable requests.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nWhen 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.\n\nAn 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.\n\nThe 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.\n\n### Patches\n\nUpgrade 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.\n\n### Workarounds\n\nCompose the interceptors as `compose(cache(), redirect())`, use per-origin dispatchers and cache stores, or disable shared caching on redirect-capable requests.","format":"markdown","source":"ghsa"}],"published":"2026-10-15T18:28:04.954Z","modified":"2026-10-27T19:15:22.403Z","severity":{"scorer":"openjs","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},"severities":[{"scorer":"openjs","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-346","CWE-524"],"affected":[{"ranges":[{"type":"semver","introduced":"7.0.0","fixed":"7.30.1","status":"affected"},{"type":"semver","version":"7.30.1","status":"unaffected"},{"type":"semver","introduced":"8.0.0","fixed":"8.12.2","status":"affected"},{"type":"semver","version":"8.12.2","status":"unaffected"}],"vendor":"undici","product":"undici","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"7.30.1"}],"ecosystem":"npm","package":"undici","purl":"pkg:npm/undici","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"8.0.0","status":"affected","fixed":"8.12.2"}],"ecosystem":"npm","package":"undici","purl":"pkg:npm/undici","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"7.0.0","fixed":"7.30.1"},{"status":"affected","introduced":"8.0.0","fixed":"8.12.2"}],"vendor":"nodejs","product":"undici","cpe":"cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-4w7w-5xrc-9h26","tags":["mitigation","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-109829","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici/commit/26c2bfb3def0b67241ce878e80657ed5d6c3efa8","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici/commit/b20b82ad80a405a12b6ce1f341bcd418de390aa0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici/releases/tag/v7.30.1","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici/releases/tag/v8.12.2","tags":["web"],"sources":["ghsa"]}],"credits":["Kushalkhemka","mayank-jangid-moon","opensec-intelligence","bengsky13","mcollina","UlisesGascon","skigeek16"],"assigner":"openjs","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-16T20:03:57.700Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-109829","url":"https://www.cve.org/CVERecord?id=CVE-2026-109829","licence":"CVE Terms of Use","modified":"2026-10-16T20:04:09.504Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4w7w-5xrc-9h26","url":"https://github.com/advisories/GHSA-4w7w-5xrc-9h26","licence":"CC-BY-4.0","modified":"2026-10-27T19:15:22.403Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-109829","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-109829","licence":"Public domain","modified":"2026-10-19T20:45:43.390Z"}],"updatedAt":"2026-11-25T22:59:44.923Z","epss":{"score":0.00149,"percentile":0.04302,"date":"2026-12-01T12:00:22.000Z"}}