CVE-2026-2229: undici is vulnerable to Unhandled Exception in undici WebSocket Client Due to Invalid server_max_window_bits Validation
ImpactThe 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:
* The isValidClientWindowBits() function only validates that the value contains ASCII digits, not that it falls within the valid range 8-15
* The createInflateRaw() call is not wrapped in a try-catch block
* The resulting exception propagates up through the call stack and crashes the Node.js process
Security readout for executives and security teams
Plain-English summary
Applications using the undici WebSocket client can be crashed by a malicious WebSocket server during compressed message handling. The issue is availability-only: the cited CVSS vector shows no confidentiality or integrity impact, but a reachable client process can terminate immediately.
Executive priority
Treat as a high-priority availability risk where affected systems connect outbound to untrusted WebSocket services. Patch promptly, but do not assume compromise or data exposure from the provided evidence.
Technical view
undici accepts a digit-only server_max_window_bits value for permessage-deflate without enforcing zlib's valid 8-15 range. A later compressed frame can trigger createInflateRaw with invalid windowBits, raising an uncaught synchronous RangeError and terminating Node.js.
Likely exposure
Exposure is most likely in Node.js services or tools that use affected undici versions and initiate WebSocket connections to untrusted or attacker-controlled servers.
Exploitation context
The CVE record marks KEV false, and the provided sources do not claim active exploitation. The described attack requires a malicious server-side WebSocket peer and compressed frame delivery.
Researcher notes
The root issue combines weak parameter validation and missing exception handling around zlib InflateRaw construction. Validate exposure around permessage-deflate negotiation and WebSocket client trust boundaries; avoid deriving exploit procedures from this advisory.
Mitigation direction
Upgrade undici to fixed versions 6.24.0 or 7.24.0 where applicable.
Apply relevant Red Hat advisories for vendor-packaged affected products.
Review dependency locks and transitive dependencies for affected undici ranges.
Check the upstream advisory before using temporary workarounds.
Prioritize clients connecting to external or user-controlled WebSocket endpoints.
Validation and detection
Inventory Node.js projects for direct and transitive undici dependencies.
Confirm deployed versions are outside the affected ranges.
Identify WebSocket client code that may connect to untrusted servers.
Review SBOMs, lockfiles, and container images for embedded undici copies.
Verify vendor errata status for Red Hat-distributed packages.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-1284: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-1284 · source CWE mapping
Improper Validation of Specified Quantity in Input
Improper Validation of Specified Quantity in Input represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Uncaught Exception represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.