undici is vulnerable to Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
Description
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-Length headers (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
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Undici fails to deduplicate case-variant Content-Length headers, allowing malformed HTTP/1.1 requests that can cause DoS or request smuggling.
Vulnerability
CVE-2026-1525 describes a flaw in the Undici HTTP client for Node.js where duplicate Content-Length headers are not rejected when provided as an array with case-variant names (e.g., Content-Length and content-length). This violates RFC 9110 Section 8.6, which mandates that HTTP messages must not contain multiple Content-Length header fields with different values [1]. The root cause is the absence of case-normalization when processing header arrays, leading to malformed HTTP/1.1 requests on the wire.
Exploitation
An attacker who can control the headers passed to undici.request(), undici.Client, or similar low-level APIs can supply an array containing both Content-Length and content-length with differing values. No authentication is required if the application accepts user-supplied header names without sanitization. The attack surface includes any application that uses flat header arrays and does not normalize header names before passing them to Undici.
Impact
Strict HTTP parsers (proxies, servers) will reject the malformed request with a 400 Bad Request, causing a denial of service. More critically, 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 HTTP request smuggling attacks [2]. Such smuggling may lead to ACL bypass, cache poisoning, or credential hijacking, as described in CWE-444 [2].
Mitigation
As of the publication date, no patch has been announced. Users should normalize header names to a consistent case before passing them to Undici, or avoid using flat arrays for user-controlled headers. Applications should also validate that Content-Length appears at most once. The Undici project is aware of the issue [3] and a fix is expected in a future release.
AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
undicinpm | < 6.24.0 | 6.24.0 |
undicinpm | >= 7.0.0, < 7.24.0 | 7.24.0 |
Affected products
2- undici/undiciv5Range: < 6.24.0; 7.0.0 < 7.24.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- github.com/advisories/GHSA-2mjp-6q6p-2qxmghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-1525ghsaADVISORY
- cna.openjsf.org/security-advisories.htmlghsaWEB
- cwe.mitre.org/data/definitions/444.htmlghsaWEB
- github.com/nodejs/undici/security/advisories/GHSA-2mjp-6q6p-2qxmghsaWEB
- hackerone.com/reports/3556037ghsaWEB
- www.rfc-editor.org/rfc/rfc9110.htmlghsaWEB
News mentions
0No linked articles in our index yet.