undici
Affected
- introduced
7.0.0, fixed7.18.2(semver)
Fixed versions
7.18.2
Fix
- Fixed version
7.18.2npm install [email protected]
Advisory
Also known as: CVE-2026-22036
Undici has an unbounded decompression chain in HTTP responses on Node.js Fetch API via Content-Encoding leads to resource exhaustion
Impact
The fetch() API supports chained HTTP encoding algorithms for response content according to RFC 9110 (e.g., Content-Encoding: gzip, br). This is also supported by the undici decompress interceptor.
However, the number of links in the decompression chain is unbounded and the default maxHeaderSize allows a malicious server to insert thousands compression steps leading to high CPU usage and excessive memory allocation.
Patches
Upgrade to 7.18.2 or 6.23.0.
Workarounds
It is possible to apply an undici interceptor and filter long Content-Encoding sequences manually.
References
Medium Basis: The source's own band: MODERATE
7.0.0, fixed 7.18.2 (semver)7.18.2
7.18.2npm install [email protected]0, fixed 6.23.0 (semver)6.23.0
6.23.0npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0