CVE-2026-13697: undici vulnerable to cross-user information disclosure and parse-time crash via degenerate private cache directives

Published Jul 29, 2026
·
Updated

Summary

Two issues in undici's cache interceptor, both fixed by the same patch on lib/util/cache.js:

1. Shared-cache disclosure: Responses with malformed qualified Cache-Control: private directives such as private="" or private="," can be incorrectly stored in the default shared cache, then served to a later caller with the same cache key. 2. Parse-time crash: Mixed unqualified-and-qualified private directives in the same header (such as public, max-age=60, private, private="hdr") cause an uncaught TypeError in the cache-control parser, terminating the request.

Impact

Shared-cache disclosure

Applications using interceptors.cache() in shared mode may cache a user-specific response and serve it to a later caller with the same cache key. This can disclose private response bodies and headers, including Set-Cookie.

Required conditions:

- the cache interceptor is enabled in shared mode, including the default configuration; - an upstream returns a malformed directive such as Cache-Control: public, max-age=300, private=""; - another request later matches the same cache key, without a separating Vary header.

Parse-time crash

Applications using interceptors.cache() against an upstream that returns a Cache-Control header combining unqualified private with qualified private="..." see an uncaught TypeError: output.private.concat is not a function during response handling. The request rejects; depending on the consumer's error handling, the process may exit.

Details

private="" is parsed as { private: [''] }. The shared-cache guard only rejects private === true, so the response can be stored. When served from cache, the previous user's body and headers may be returned to a different user.

For the crash variant, an unqualified private directive sets output.private = true, then a subsequent qualified private="hdr" directive attempts output.private.concat(['hdr']), which throws because boolean has no concat method.

The patch routes the qualified-directive path through a shared helper that normalizes empty-after-trim arrays to true and preserves existing true values, closing both vectors.

Patches

Upgrade to undici 7.29.0 or 8.9.0. Both releases fix the qualified private directive handling that caused the shared-cache storage and the parser crash.

Workarounds

Until patched, avoid shared interceptors.cache() for user-specific responses, use type: 'private', or disable caching for affected origins.

Credit

Disclosure variant reported by @h0rk1p via HackerOne report #3817497.

Other sources

undici's cache interceptor mishandles malformed Cache-Control private directives. In undici 7.0.0 up to before 7.29.0 and 8.0.0 up to before 8.9.0, a response carrying a degenerate qualified private directive, such as private set to an empty value, can be stored in the default shared cache and later served to a different caller with the same cache key, disclosing private response bodies and headers including Set-Cookie. Separately, a Cache-Control header that combines an unqualified private directive with a qualified one triggers an uncaught TypeError in the cache-control parser, which rejects the request and, depending on the consumer's error handling, can terminate the process. Both issues affect applications using the cache interceptor in shared mode, including the default configuration. The issues are fixed in undici 7.29.0 and 8.9.0.

MITRE

Affected Software

6 affected componentsFixes available
npm/undici>=7.0.0<7.29.0
npm/undici>=8.0.0<8.9.0
npm/undici>=8.0.0<8.9.0
8.9.0
npm/undici>=7.0.0<7.29.0
7.29.0
Nodejs Undici Node.js>=7.0.0<7.29.0
Nodejs Undici Node.js>=8.0.0<8.9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 8.9.0
  2. Upgrade

    Upgrade npm/undici to a version that resolves this vulnerability.

    Fixed in 7.29.0
  3. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 7.29.0
  4. Upgrade

    Upgrade undici to a version that resolves this vulnerability.

    Fixed in 8.9.0
  5. Compensating control

    Avoid using shared `interceptors.cache()` for user-specific responses when caching with undici (workaround for shared-cache disclosure and parse-time crash).

  6. Compensating control

    When using undici cache interceptor, set caching `type: 'private'` (workaround for shared-cache disclosure and parse-time crash).

  7. Compensating control

    Disable caching for affected upstream origins when using shared `interceptors.cache()` (workaround for shared-cache disclosure and parse-time crash).

Event History

Jul 29, 2026
CVE Published
via MITRE·04:32 PM
Data Sourced
via MITRE·04:32 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:16 PM
DescriptionSeverityWeaknessAffected Software
Aug 3, 2026
Advisory Published
via GitHub·07:19 PM
Data Sourced
via GitHub·07:19 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-13697?

The severity of CVE-2026-13697 is rated high with a score of 7.4.

2

How do I fix CVE-2026-13697?

To fix CVE-2026-13697, upgrade to undici version 7.29.0 or later, or 8.9.0 or later.

3

What types of attacks does CVE-2026-13697 allow?

CVE-2026-13697 allows cross-user information disclosure and potential crashes due to malformed Cache-Control directives.

4

Which versions of undici are affected by CVE-2026-13697?

CVE-2026-13697 affects undici versions from 7.0.0 up to before 7.29.0 and from 8.0.0 up to before 8.9.0.

5

What components of undici does CVE-2026-13697 impact?

CVE-2026-13697 impacts the cache interceptor component of undici.

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