---
id: "CVE-2026-120415"
page: "https://infrastack.ai/live/CVE-2026-120415"
kind: "vulnerability"
aliases: ["CVE-2026-120415"]
title: "undici: array-form headers leak credentials on cross-origin redirects"
severity: "medium"
cvss: 5.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["http-client", "node.js", "package", "undici"]
not_affected_if: ["flat-header-array", "plain-object-headers", "redirect-interceptor-outermost"]
published_at: "2026-11-06T10:16:36+00:00"
first_seen_at: "2026-11-06T10:40:56+00:00"
updated_at: "2026-11-06T10:41:21+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120415", "first_seen_at": "2026-11-06T10:40:56+00:00"}]
exploit_sources: []
---

# undici: array-form headers leak credentials on cross-origin redirects

Link for people: https://infrastack.ai/live/CVE-2026-120415 (this .md is for agents)

undici, the HTTP client built into Node.js, fails to strip Authorization and Cookie headers on cross-origin redirects when headers are passed as an array of tuples. When a cache or deduplicate interceptor sits outside the redirect interceptor, those credentials are sent to the redirect destination.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `npm ls undici` to find undici versions in the project tree
- Look for undici `7.0.0` through `7.30.1` or `8.0.0` through `8.12.3`
- Check whether code passes request headers as an array of tuples (for example from Object.entries) and composes the cache or deduplicate interceptor outside the redirect interceptor

## Fix

- undici `7.30.2`
- undici `8.12.4`

## Timeline

- 2026-11-06T10:40:56+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120415

## Documents

- [advisory] Vendor advisory: github.com https://github.com/nodejs/undici/security/advisories/GHSA-9v6h-8rgp-m69f

## From the sources

undici is an HTTP client for Node.js. In versions 7.0.0 through 7.30.1 and 8.0.0 through 8.12.3, the redirect interceptor strips sensitive headers such as Authorization, Cookie, Proxy-Authorization, and Host when a request is redirected to a different origin, but when request headers are supplied as an array of name and value tuples (a valid documented input, for example from Object.entries), the redirect handler misreads them as a flat list so the header names never match and the sensitive headers are not removed. If a header-normalizing interceptor such as cache or deduplicate is composed outside the redirect interceptor, it then serializes the retained headers onto the cross-origin request, disclosing the caller's origin-bound credentials to the unrelated redirect destination. This is a representation-dependent bypass of the cross-origin header stripping added in CVE-2024-30260. The issue is fixed in undici 7.30.2 and 8.12.4, and users should upgrade to one of those versions or later. As a workaround, supply request headers as a plain object or a flat name and value array rather than an array of tuples, or compose the redirect interceptor outside the normalizing interceptor.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
