CVE-2026-139823: undici vulnerable to cache poisoning and cross-host disclosure via a mismatched Host header

Published Dec 5, 2026
·
Updated

undici is an HTTP client for Node.js. In versions 7.0.0 through 7.30.3 and 8.0.0 through 8.14.0, the cache interceptor looks up and stores responses by the request's origin, method, and path, while 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. Applications are affected only when they use the cache interceptor and send requests whose Host header names a different authority than the request origin, and responses that include a Vary header on Host are not affected. The issue is fixed in undici 7.30.4 and 8.14.1, and users should upgrade to one of those versions or later and clear persistent cache stores populated before upgrading. As a workaround, do not use the cache interceptor on dispatchers that send an explicit Host header for a different host, use a separate dispatcher and cache store per host, or have the server send a Vary header on Host.

Affected Software

1 affected component
npm/undici>=7.0.0<=7.30.3, >=8.0.0<=8.14.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 7.30.4
  2. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 8.14.1
  3. Compensating control

    As a workaround, do not use the cache interceptor on dispatchers that send an explicit Host header for a different host, use a separate dispatcher and cache store per host, or have the server send a Vary header on Host.

  4. Operational

    Clear persistent cache stores populated before upgrading.

Event History

Dec 5, 2026
CVE Published
via MITRE·10:06 AM
Data Sourced
via MITRE·10:06 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are affected?

Only applications that use undici's cache interceptor and send requests where the explicit Host header names a different authority than the request origin are affected. Responses with a Vary header on Host are not affected.

2

What does an attacker need to exploit this?

An attacker needs to be able to control the Host header for a request that is cached under a shared origin, method, and path key. They can then cause a response for one host to be served to requests for another host using the same origin and path.

3

What should we do if we cannot upgrade immediately?

Do not use the cache interceptor on dispatchers that send an explicit Host header for an authority different from the request origin. When upgrading, move to undici 7.30.4 or 8.14.1 or later.

4

How should existing cache data be handled after remediation?

Clear persistent cache stores populated before the upgrade. Previously stored entries may have been keyed under the shared origin rather than the Host authority.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203