# GHSA-G489-Q6J6-RH55: undici vulnerable to cache poisoning and cross-host disclosure via a mismatched Host header

- Database: GitHub
- Severity: CVSS 4.8 (Medium)
- Published: 2026-12-04
- Modified: 2026-12-04

## Tracked as

- [CVE-2026-139823](https://cve.now/CVE-2026-139823.md): undici cache poisoning and cross-host disclosure in HTTP client

## Affected versions

- undici (npm): from 7.0.0, fixed in 7.30.4
- undici (npm): from 8.0.0, fixed in 8.14.1

## Description

### Impact

undici's cache interceptor (`interceptors.cache()`) looks up and stores responses by the request's origin, method and path, but undici sends an explicit `Host` request header to the server as given. When an application sends requests for several hosts to one origin by setting the `Host` header, a cacheable response for one `Host` is stored under the shared origin key and served to a later request for a different `Host`, without that request reaching the server. This can disclose one host's response to callers of another, and lets a caller who controls the `Host` header of one request choose the response that other requests to the same origin and path receive.

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 they compose `interceptors.cache()` and send requests whose `Host` header names a different authority than the request origin. Responses that include `Vary: Host` are not affected.

### Patches

Upgrade to undici `7.30.4` or `8.14.1`. Requests whose `Host` header names a different authority than the origin now bypass the cache entirely. Persistent stores such as `SqliteCacheStore` populated before upgrading may still hold cross-host entries and should be cleared.

### Workarounds

Do not compose `interceptors.cache()` on dispatchers that send requests with an explicit `Host` header for a different host, use a separate dispatcher and cache store per host, or have the server send `Vary: Host` on responses that differ by host.

## References

- https://github.com/nodejs/undici/security/advisories/GHSA-g489-q6j6-rh55

Page: https://cve.now/GHSA-G489-Q6J6-RH55

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
