CVE-2026-1525: Undici has an HTTP Request/Response Smuggling issue
Impact Undici allows duplicate HTTP Content-Length headers when they are provided in an array with case-variant names (e.g., Content-Length and content-length). This produces malformed HTTP/1.1 requests with multiple conflicting Content-Length values on the wire.
Published Mar 13, 2026
Affected packages
undici
- Ecosystem
- npm
- Affected
- < 6.24.0
- Fixed in
- 6.24.0
- Check
npm ls undici
undici
- Ecosystem
- npm
- Affected
- >= 7.0.0, < 7.24.0
- Fixed in
- 7.24.0
- Check
npm ls undici
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
Undici allows duplicate HTTP Content-Length headers when they are provided in an array with case-variant names (e.g., Content-Length and content-length). This produces malformed HTTP/1.1 requests with multiple conflicting Content-Length values on the wire.
Who is impacted:
- Applications using
undici.request(),undici.Client, or similar low-level APIs with headers passed as flat arrays - Applications that accept user-controlled header names without case-normalization
Potential consequences:
- Denial of Service: Strict HTTP parsers (proxies, servers) will reject requests with duplicate
Content-Lengthheaders (400 Bad Request) - HTTP Request Smuggling: In deployments where an intermediary and backend interpret duplicate headers inconsistently (e.g., one uses the first value, the other uses the last), this can enable request smuggling attacks leading to ACL bypass, cache poisoning, or credential hijacking
Patches
Patched in the undici version v7.24.0 and v6.24.0. Users should upgrade to this version or later.
Workarounds
If upgrading is not immediately possible:
- Validate header names: Ensure no duplicate
Content-Lengthheaders (case-insensitive) are present before passing headers to undici - Use object format: Pass headers as a plain object (
{ 'content-length': '123' }) rather than an array, which naturally deduplicates by key - Sanitize user input: If headers originate from user input, normalize header names to lowercase and reject duplicates
Credited to mcollina, UlisesGascon.
References
- https://github.com/nodejs/undici/security/advisories/GHSA-2mjp-6q6p-2qxm
- https://nvd.nist.gov/vuln/detail/CVE-2026-1525
- https://hackerone.com/reports/3556037
- https://cna.openjsf.org/security-advisories.html
- https://cwe.mitre.org/data/definitions/444.html
- https://www.rfc-editor.org/rfc/rfc9110.html#section-8.6
- https://github.com/advisories/GHSA-2mjp-6q6p-2qxm
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-109383
undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent
high7.4Oct 27, 2026CVE-2026-109829
undici vulnerable to cache poisoning and cross-user disclosure via cross-origin redirects
high7.4Oct 27, 2026CVE-2026-109855
undici WebSocket client vulnerable to Denial of Service via failed HTTP/2 handshake
high7.5Oct 27, 2026CVE-2026-109932
undici WebSocket client vulnerable to Denial of Service via unbounded automatic PONG buffering
medium5.9Oct 27, 2026CVE-2026-87018
undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation
high7.5Oct 27, 2026CVE-2026-87029
undici vulnerable to Denial of Service via unhandled exception in the decompress interceptor
medium5.9Oct 27, 2026
