CVE-2026-2229: Undici Undici Has Unhandled Exception Vulnerability
HIGHCVE-2026-2229 is a HIGH (CVSS 7.5) undici has unhandled exception vulnerability (CWE-248: Uncaught Exception) affecting Undici libraries in the npm ecosystem. The issue involves undici has unhandled exception in websocket client due to invalid server_max_window_bits validation. Remediation is available by upgrading affected packages to version 6.24.0, 7.24.0.
CVE-2026-2229 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-2229
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@6.24.0
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-2229, 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 6.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-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. 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-2229 Affected Undici Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
undici
|
npm |
< 6.24.0
|
6.24.0
|
|
undici
|
npm |
≥ 7.0.0
< 7.24.0
|
7.24.0
|
References
Frequently Asked Questions
What is CVE-2026-2229?
Which Undici versions are affected?
What version fixes CVE-2026-2229?
Is undici affected?
What is the CVSS score of CVE-2026-2229?
What CWE is associated with CVE-2026-2229?
How can I check npm dependencies for CVE-2026-2229?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v9p9-hfj2-hcw8",
"modified" : "2026-03-13T20:41:41Z",
"published" : "2026-03-13T20:41:41Z",
"aliases" : [ "CVE-2026-2229" ],
"summary" : "Undici has Unhandled Exception in WebSocket Client Due to Invalid server_max_window_bits Validation",
"details" : "### Impact\n\nThe undici WebSocket client is vulnerable to a denial-of-service attack due to improper validation of the `server_max_window_bits` parameter in the permessage-deflate extension. When a WebSocket client connects to a server, it automatically advertises support for permessage-deflate compression. A malicious server can respond with an out-of-range `server_max_window_bits` value (outside zlib's valid range of 8-15). When the server subsequently sends a compressed frame, the client attempts to create a zlib InflateRaw instance with the invalid windowBits value, causing a synchronous RangeError exception that is not caught, resulting in immediate process termination.\n\nThe vulnerability exists because:\n\n1. The `isValidClientWindowBits()` function only validates that the value contains ASCII digits, not that it falls within the valid range 8-15\n2. The `createInflateRaw()` call is not wrapped in a try-catch block\n3. The resulting exception propagates up through the call stack and crashes the Node.js process\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "undici"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.24.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "undici"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.24.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/nodejs/undici/security/advisories/GHSA-v9p9-hfj2-hcw8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-2229"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/3487486"
}, {
"type" : "WEB",
"url" : "https://cna.openjsf.org/security-advisories.html"
}, {
"type" : "WEB",
"url" : "https://datatracker.ietf.org/doc/html/rfc7692"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nodejs/undici"
}, {
"type" : "WEB",
"url" : "https://nodejs.org/api/zlib.html#class-zlibinflateraw"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-248" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-13T20:41:41Z",
"nvd_published_at" : "2026-03-12T21:16:25Z"
}
}