CVE-2026-2581: Undici Denial of Service Vulnerability
MODERATECVE-2026-2581 is a MODERATE (CVSS 5.9) denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Undici libraries in the npm ecosystem. The issue involves undici has unbounded memory consumption in its deduplicationhandler via response buffering that leads to dos. Remediation is available by upgrading affected packages to version 7.24.0.
CVE-2026-2581 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-2581
To remediate this vulnerability, upgrade all affected Undici dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install undici@7.24.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls undici
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-2581, inspect your project dependencies using npm:
npm ls undici
Analyze the terminal output to locate any version of Undici in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.24.0), your application is affected.
Note: The npm ls undici command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Undici, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-2581 Affected Undici Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
undici
|
npm |
≥ 7.17.0
< 7.24.0
|
7.24.0
|
References
Frequently Asked Questions
What is CVE-2026-2581?
Which Undici versions are affected?
What version fixes CVE-2026-2581?
Is undici affected?
What is the CVSS score of CVE-2026-2581?
What CWE is associated with CVE-2026-2581?
How can I check npm dependencies for CVE-2026-2581?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-phc3-fgpg-7m6h",
"modified" : "2026-03-13T20:37:58Z",
"published" : "2026-03-13T20:37:58Z",
"aliases" : [ "CVE-2026-2581" ],
"summary" : "Undici has Unbounded Memory Consumption in its DeduplicationHandler via Response Buffering that leads to DoS",
"details" : "## Impact\nThis is an uncontrolled resource consumption vulnerability (CWE-400) that can lead to Denial of Service (DoS).\n\nIn 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.\n\nImpacted users are applications that use Undici’s deduplication interceptor against endpoints that may produce large or long-lived response bodies.\n\n## Patches\n\nThe 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.\n\nUsers should upgrade to the first official Undici (and Node.js, where applicable) releases that include this patch.\n\n## Workarounds\nIf upgrading immediately is not possible:\n\n- Disable `interceptors.deduplicate()` for affected clients/routes.\n- Use `skipHeaderNames` with a marker header to force high-risk requests to bypass deduplication.\n- Avoid concurrent identical requests to untrusted endpoints that may return very large/chunked bodies.\n- Apply upstream/proxy response-size and timeout limits.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "undici"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.17.0"
}, {
"fixed" : "7.24.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/nodejs/undici/security/advisories/GHSA-phc3-fgpg-7m6h"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-2581"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/3513473"
}, {
"type" : "WEB",
"url" : "https://cna.openjsf.org/security-advisories.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nodejs/undici"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-13T20:37:58Z",
"nvd_published_at" : "2026-03-12T21:16:25Z"
}
}