undici
Affected
- introduced
7.17.0, fixed7.24.0(semver)
Fixed versions
7.24.0
Fix
- Fixed version
7.24.0npm install [email protected]
Advisory
Also known as: CVE-2026-2581
Undici has Unbounded Memory Consumption in its DeduplicationHandler via Response Buffering that leads to DoS
Impact
This is an uncontrolled resource consumption vulnerability (CWE-400) that can lead to Denial of Service (DoS).
In vulnerable Undici versions, when interceptors.deduplicate() is enabled, response data for deduplicated requests could be accumulated in memory for downstream handlers. An attacker-controlled or untrusted upstream endpoint can exploit this with large/chunked responses and concurrent identical requests, causing high memory usage and potential OOM process termination.
Impacted users are applications that use Undici’s deduplication interceptor against endpoints that may produce large or long-lived response bodies.
Patches
The issue has been patched by changing deduplication behavior to stream response chunks to downstream handlers as they arrive (instead of full-body accumulation), and by preventing late deduplication when body streaming has already started.
Users should upgrade to the first official Undici (and Node.js, where applicable) releases that include this patch.
Workarounds
If upgrading immediately is not possible:
interceptors.deduplicate() for affected clients/routes.skipHeaderNames with a marker header to force high-risk requests to bypass deduplication.Medium Basis: The source's own band: MODERATE
7.17.0, fixed 7.24.0 (semver)7.24.0
7.24.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