Changing only the shape of a headers value changed who received the credentials.
A plain object crossed an origin-changing redirect cleanly: Undici removed Authorization, Cookie, Proxy-Authorization, Host, and a custom x-api-key. The same name-value pairs produced by Object.entries() reached the unrelated redirect target intact.
Reversing two interceptors stopped that leak. It also selected the path affected by a second bug. A 304 Not Modified from origin B validated a cached response from origin A, and an anonymous request received the body previously stored for Alice.
The two affected compositions are mirror images:
compose(cache(), redirect()) // tuple-header credential leakcompose(redirect(), cache()) // foreign-304 cached-body disclosureWe reproduced both issues with loopback-only origins and matched negative controls. The figures below are built from those observations; the complete reproduction programs are deliberately not part of this article.
GitHub published GHSA-9v6h-8rgp-m69f and GHSA-5rm8-gv32-r954 on 5 November 2026. We reported the issues as Omoikane Labs.
A tuple is still an array
Undici accepts several public header representations. Two matter here: a flat string array such as ['authorization', 'Bearer …'], and an iterable of [name, value] pairs. A normal array returned by Object.entries() is both a JavaScript array and an iterable of pairs.
Before the fix, RedirectHandler asked only whether the value was an array. It then read every second element as a header name:
if (Array.isArray(headers)) { for (let i = 0; i < headers.length; i += 2) { if (!shouldRemoveHeader(headers[i], ...)) { ret.push(headers[i], headers[i + 1]) } }}That loop is correct for a flat list. For Object.entries(headers), however, headers[0] is the whole pair:
['authorization', 'Bearer origin-a-token']The header-name helper converts that array to the string authorization,Bearer origin-a-token. It no longer equals authorization, so the sensitive-name check does not remove it. The same mismatch applies to cookie, proxy-authorization, host, and names supplied through stripHeadersOnCrossOriginRedirect.
The malformed intermediate value is not yet an HTTP header. The next cache() or deduplicate() interceptor normalizes the retained tuples, turning them back into valid headers on the redirected request. Origin B receives credentials that were authorized only for origin A.
In the loopback run, object and flat-array controls stripped all protected values. The tuple trigger disclosed all five tested names across every redirect status that RedirectHandler follows.
The result did not depend on cache storage. Our cache case sent Cache-Control: no-store; the interceptor normalized the headers before honoring that directive. The same trigger also worked with deduplicate().
The patch for CVE-2026-120415 adds the missing representation check. If the first array element is itself an array, Undici iterates [key, value] pairs and tests the actual key. Otherwise it keeps the old flat-list path.
That is a small fix, but it restores the important invariant: changing a documented header representation must not change which credentials survive a cross-origin redirect.
A 304 from B releases A’s cached body
The second issue starts with valid cache behavior. RFC 9111 section 3.5 permits a shared cache to store an authenticated response when an applicable response directive allows it. A response with must-revalidate, max-age=0 may be stored, but it cannot be reused until the origin successfully validates it.
Our first request authenticated as Alice. Origin A returned an authorization-gated body, alice-private-body, with that cache policy and ETag: "trusted". Undici stored it.
The next request for the same URL was anonymous. The cache made it conditional by adding If-None-Match: "trusted". In the affected compose(redirect(), cache()) order, origin A redirected that revalidation request to origin B. The redirect handler removed Alice’s credentials, but the cache-generated validator continued to B.
Origin B returned 304 Not Modified with a deliberately different ETag: "foreign-mismatch". It had never produced A’s representation and could not validate it. Undici nevertheless treated the 304 as successful revalidation and returned A’s stored body to the anonymous caller with status 200.
The matched control used the reverse composition. B received no validator and returned its ordinary public body; the anonymous caller did not receive Alice’s cached response.
The old revalidation path distinguished a successful 304 from a new response, but did not bind that 304 to the cached representation’s URL or validator:
if (success) { if (statusCode === 304) { // cache-policy updates } sendCachedValue(handler, opts, result, age, context, stale)}There are two broken checks in that flow. A response from origin B cannot validate a representation from origin A. Independently, RFC 9111 section 4.3.4 does not let a mismatched strong ETag select A’s stored response for update.
The patch for CVE-2026-116630 enforces both boundaries. The final response origin, path, and query must match the cache key, and an ETag returned with the 304 must match the stored representation. A failed check evicts the entry and refetches without the cache-generated validators.
Reordering fixes one path and opens the other
The bugs are technically distinct. One confuses two header representations before a redirect. The other confuses who is allowed to validate a stored response. Interceptor order connects them.
| Composition | CVE-2026-120415 | CVE-2026-116630 |
|---|---|---|
compose(cache(), redirect()) |
Affected with tuple-array headers | Not affected |
compose(redirect(), cache()) |
Not affected | Affected with a shared cache |
Those cells assume the remaining prerequisites for each advisory. They are not claims that either composition leaks data on every request.
The first advisory lists putting redirect() outside the normalizing interceptor as one workaround. That changes the composition to the one affected by the second advisory when a shared cache and cross-origin revalidation are also present. Reordering alone is therefore not a complete response for an application that can meet both sets of conditions.
The common lesson is narrower than “interceptor order is dangerous.” Each interceptor can preserve its local contract while the composition loses an end-to-end security property. Redirect stripping needs to understand every supported header representation. Cache revalidation needs to bind the validating response to the exact origin and representation that created the entry.
Who is actually exposed
These advisories do not say that every call to Node.js fetch() leaks credentials or cached responses. Both require explicit Undici interceptor compositions and additional conditions.
CVE-2026-120415 requires:
-
a credential-bearing request whose headers are an array of tuples, commonly from
Object.entries(); -
cache()ordeduplicate()composed outsideredirect(); and -
a cross-origin redirect to a destination the caller did not authorize to receive those credentials.
We demonstrated disclosure of Authorization, Cookie, Proxy-Authorization, Host, and a caller-configured x-api-key. We did not demonstrate integrity or availability impact.
CVE-2026-116630 requires:
-
compose(redirect(), cache())with a sharedMemoryCacheStoreorSqliteCacheStore; -
a stored response that must be revalidated before reuse;
-
reuse of that cache across security contexts; and
-
attacker influence over a cross-origin redirect and the destination’s conditional response.
We demonstrated an anonymous caller receiving the complete body of an earlier authorization-gated response. We did not demonstrate modification of the cached bytes, arbitrary response injection, or availability impact.
Both CVEs affect Undici >=7.0.0 <7.30.2 and >=8.0.0 <8.12.4. Both have a CVSS 3.1 score of 5.9 Medium (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N). The high-complexity rating reflects the required composition and redirect conditions rather than reducing the confidentiality of a successful case.
The CISA ADP entries marked exploitation as none, automatable as no, and technical impact as partial on 10 November 2026. That is a dated public assessment, not evidence that exploitation has never occurred.
For review, start with explicit Agent.compose() calls rather than all outbound HTTP traffic. Trace whether tuple-array headers carry credentials into redirect-capable requests, and whether a shared cache spans users or tenants. Validators sent after an origin-changing redirect, followed by a 304 and local replay of a cached 200 response, are useful investigation signals; each is a lead, not proof by itself.
Upgrade instead of choosing an order
Upgrade Undici 7.x to 7.30.2 or later, or 8.x to 8.12.4 or later. Both fixed releases shipped on 5 November 2026.
If an immediate upgrade is impossible, the first issue can be bounded by supplying headers as a plain object or a flat alternating array instead of tuple arrays. For the second, use per-origin dispatchers and cache stores, or disable shared caching on redirect-capable requests. These controls address different preconditions; swapping the two interceptors is not a substitute for the patched checks.
After upgrading, review the exposure window for credential-bearing cross-origin redirects and shared-cache revalidations that changed origin. Request logs may show a protected header at an unexpected destination or an origin-A validator arriving at origin B. Cache hits alone cannot establish disclosure, and missing logs cannot establish safety.
Timeline
-
26 October 2026 — Git metadata records the two maintainer fixes as authored.
-
4 November 2026 — Both fixes landed in the Undici repository.
-
5 November 2026 — Undici 7.30.2 and 8.12.4 shipped; GitHub published both security advisories.
-
6 November 2026 — CVE-2026-120415 and CVE-2026-116630 were published in the CVE List.
-
10 November 2026 — CISA added its SSVC assessments to both CVE records.