undici vulnerable to Denial of Service via unhandled exception resuming tuple-array header requests
Description
Impact
When an application composes the retry interceptor outside an interceptor that normalizes request headers (dns, cache or deduplicate, for example compose(interceptors.dns(), interceptors.retry())) and passes request headers as an array of pairs (a tuple array), an origin that sends part of a resumable response body and then closes the connection drives the retry interceptor to rebuild the request headers for a byte-range resume. buildResumeHeaders reads every array as a flat key/value list, so it calls toLowerCase() on a tuple, throwing an uncaught TypeError inside the retry timer and terminating the Node.js process. The attacker controls only the response; the application must compose retry outside one of those interceptors and supply tuple-array headers. The impact is availability of the undici client process. The vulnerable resume-header handling exists only in undici 8.12.0 and later.
Patches
Upgrade to 8.14.1, which routes tuple-array headers to the existing per-pair handling so the resume path no longer throws. The 7.x line is not affected (the resume-header feature was introduced in 8.12.0).
Workarounds
Pass request headers as an object or a flat key/value array rather than an array of pairs, until upgrading.