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:
undici.request(), undici.Client, or similar low-level APIs with headers passed as flat arraysPotential consequences:
Content-Length headers (400 Bad Request)Patched in the undici version v7.24.0 and v6.24.0. Users should upgrade to this version or later.
If upgrading is not immediately possible:
Content-Length headers (case-insensitive) are present before passing headers to undici{ 'content-length': '123' }) rather than an array, which naturally deduplicates by key{
"cwe_ids": [
"CWE-444"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-13T20:07:03Z",
"nvd_published_at": "2026-03-12T20:16:02Z",
"severity": "MODERATE"
}