undici is vulnerable to Cache Poisoning
68
CVE Score
Medium
Cache Poisoning
When an originless Agent composes the interceptors as compose(redirect(), cache()) with a shared cache, the cache key is built from the original request URL before the redirect handler changes the origin. The response produced after a cross-origin redirect is then stored under the original URL. An attacker who controls a redirect target can poison the shared cache so later callers receive the attacker's body for a trusted URL, and private no-store responses from user-specific redirect targets can be served to later unauthenticated callers. The fix verifies that the origin producing the response still matches the cache key before storing it, and preserves each redirect hop's cache-control policy.
Upgrade the undici library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you use an originless Agent with a shared MemoryCacheStore or SqliteCacheStore and the composition compose(redirect(), cache()). Origin-bound Client and Pool dispatchers, and compose(cache(), redirect()), are not affected.
7.0.0 - 7.30.0
Fixed in 7.30.18.0.0 - 8.12.1
Fixed in 8.12.2undici is vulnerable to Cache Poisoning in versions 7.0.0 - 7.30.0 and 8.0.0 - 8.12.1.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.