Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. undici
  4. ›
  5. CVE-2026-2229

CVE-2026-2229: Undici has Unhandled Exception in WebSocket Client Due to Invalid server_max_window_bits Validation

March 13, 2026

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

References

  • cna.openjsf.org/security-advisories.html
  • datatracker.ietf.org/doc/html/rfc7692
  • github.com/advisories/GHSA-v9p9-hfj2-hcw8
  • github.com/nodejs/undici
  • github.com/nodejs/undici/security/advisories/GHSA-v9p9-hfj2-hcw8
  • hackerone.com/reports/3487486
  • nodejs.org/api/zlib.html
  • nvd.nist.gov/vuln/detail/CVE-2026-2229

Code Behaviors & Features

Detect and mitigate CVE-2026-2229 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 6.24.0, all versions starting from 7.0.0 before 7.24.0

Fixed versions

  • 6.24.0
  • 7.24.0

Solution

Upgrade to versions 6.24.0, 7.24.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-248: Uncaught Exception

Source file

npm/undici/CVE-2026-2229.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 14 Mar 2026 12:18:21 +0000.