CVE-2026-2229: undici is vulnerable to Unhandled Exception in undici WebSocket Client Due to Invalid server_max_window_bits Validation
### Impact The 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. The vulnerability exists because: 1. The `isValidClientWindowBits()` function only validates that the value contains ASCII digits, not that it falls within the valid range 8-15 2. The `createInflateRaw()` call is not wrapped in a try-catch block 3. The resulting exception propagates up through the call stack and crashes the Node.js process ### Patches _Has the problem been patched? What versions should users upgrade to?_ ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-2229?
CVE-2026-2229 is classified as a high severity vulnerability due to its potential to cause a denial-of-service attack.
How do I fix CVE-2026-2229?
To fix CVE-2026-2229, update the undici library to the latest version where the vulnerability has been addressed.
What types of attacks are possible due to CVE-2026-2229?
CVE-2026-2229 allows for denial-of-service attacks primarily through improper validation of the server_max_window_bits parameter.
Which software is affected by CVE-2026-2229?
CVE-2026-2229 affects the undici library used in Node.js applications.
Is CVE-2026-2229 related to WebSockets?
Yes, CVE-2026-2229 is specifically related to the undici WebSocket client.