CVE-2026-2229: Undici WebSocket Client Denial-of-Service Vulnerability Due to Invalid server_max_window_bits Validation

undici Updated 13 Mar 2026

Summary

13/03/2026
Yes i
High
7.5

CVE-2026-2229: Undici has Unhandled Exception in WebSocket Client Due to Invalid server_max_window_bits Validation. Affects undici across 2 version ranges.

< 6.24.0 >= 7.0.0, < 7.24.0

Fixed in 6.24.0 or 7.24.0, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Undici is a popular HTTP/1.1 client designed for Node.js, known for its performance and efficiency in handling HTTP requests. It supports various features, including HTTP/2 and WebSocket connections. However, a vulnerability has been identified in its WebSocket client related to the permessage-deflate extension, which can lead to denial-of-service attacks if exploited by a malicious server.

Vulnerability Detail

The vulnerability arises from improper validation of the server_max_window_bits parameter in the permessage-deflate extension. When a WebSocket client connects to a server, it advertises support for compression. If a malicious server responds with an out-of-range server_max_window_bits value (outside zlib's valid range of 8-15), the client attempts to create a zlib InflateRaw instance with this invalid value. This results in a synchronous RangeError exception that is not caught, leading to the termination of the Node.js process. The root causes include inadequate validation in the isValidClientWindowBits() function and the absence of a try-catch block around the createInflateRaw() call.

How To Fix

Latest published version: 8.12.3 as of 22 Oct 2026

npm install undici@8.12.3

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 6.24.0 6.24.0
    npm install undici@6.24.0
  • >= 7.0.0, < 7.24.0 7.24.0
    npm install undici@7.24.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to upgrade to the patched versions as soon as possible.

Conclusion

The Undici WebSocket client vulnerability CVE-2026-2229 poses a significant risk due to improper validation of the server_max_window_bits parameter, which can lead to denial-of-service attacks. Users are strongly advised to upgrade to the patched versions to mitigate this risk.

See every vulnerability recorded for undici →

Share this vulnerability

FAQ

CVE-2026-2229 is a vulnerability in the Undici WebSocket client that can lead to denial-of-service attacks due to improper validation of the server_max_window_bits parameter.

If your application uses the Undici WebSocket client, a malicious server could exploit this vulnerability to crash your Node.js process, leading to downtime.

Versions of Undici prior to 6.24.0 and 7.24.0 are affected by this vulnerability.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application against this vulnerability using the Vulert playground without any signup.

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for undici.

How To Fix

Latest published version: 8.12.3 as of 22 Oct 2026

npm install undici@8.12.3

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 6.24.0 6.24.0
    npm install undici@6.24.0
  • >= 7.0.0, < 7.24.0 7.24.0
    npm install undici@7.24.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback