5.9medium
undici is vulnerable to Unbounded Memory Consumption in in Undici's DeduplicationHandler via Response Buffering leads to DoS
- Severity
- 5.9medium CVSS:3.1 by openjs
- Exploit likelihood
- 0.63% (higher than 51% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- openjs
- Also known as
- GHSA-phc3-fgpg-7m6h
Description
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. PatchesThe 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| undici | < 6.24.0; 7.0.0 < 7.24.0 Not affected: 6.24.0: 7.24.0 | CVE List |
| undici (npm) | from 7.17.0 before 7.24.0 | GitHub Advisory Database |
| nodejs undici | from 7.17.0 before 7.24.0 | NVD |
All scores
| openjs | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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. PatchesThe 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.
GitHub Advisory Database
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:
- Disable
interceptors.deduplicate()for affected clients/routes. - Use
skipHeaderNameswith a marker header to force high-risk requests to bypass deduplication. - Avoid concurrent identical requests to untrusted endpoints that may return very large/chunked bodies.
- Apply upstream/proxy response-size and timeout limits.
NVD (es)
Esta es una vulnerabilidad de consumo de recursos no controlado (CWE-400) que puede conducir a una denegación de servicio (DoS). En versiones vulnerables de Undici, cuando interceptors.deduplicate() está habilitado, los datos de respuesta para solicitudes deduplicadas podrían acumularse en la memoria para los manejadores posteriores. Un endpoint ascendente controlado por un atacante o no confiable puede explotar esto con respuestas grandes/en fragmentos y solicitudes idénticas concurrentes, causando un alto uso de memoria y una posible terminación del proceso por OOM. Los usuarios afectados son aplicaciones que utilizan el interceptor de deduplicación de Undici contra endpoints que pueden producir cuerpos de respuesta grandes o de larga duración. Parches. El problema ha sido parcheado cambiando el comportamiento de deduplicación para transmitir fragmentos de respuesta a los manejadores posteriores a medida que llegan (en lugar de la acumulación del cuerpo completo), y evitando la deduplicación tardía cuando la transmisión del cuerpo ya ha comenzado. Los usuarios deberían actualizar a las primeras versiones oficiales de Undici (y Node.js, cuando corresponda) que incluyan este parche.
References
| https://github.com/nodejs/undici/security/advisories/GHSA-phc3-fgpg-7m6h | mitigation, vendor-advisory, web | |
| https://hackerone.com/reports/3513473 | permissions-required, web | |
| https://cna.openjsf.org/security-advisories.html | vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-2581 | advisory | |
| https://github.com/nodejs/undici | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-2581 changed 2026-03-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-phc3-fgpg-7m6h changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-2581 changed 2026-06-17 | Public domain |