CVE-2026-12151 undici WebSocket client vulnerable to denial of service via fragment count bypass

High 7.5 Published Updated

A malicious WebSocket server can cause memory exhaustion and denial of service in applications using the undici WebSocket client by sending many small fragments.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-12151?

CVE-2026-12151 is a high-severity denial of service vulnerability in Nodejs Undici, published on 17 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Impact: The undici WebSocket client enforces maxPayloadSize on the cumulative byte count of fragments in a message but does not enforce a limit on the number of fragments. A malicious WebSocket server can stream many small or empty continuation frames that each pass per-frame and cumulative-size validation, collectively causing unbounded memory growth in the client process. The result is memory exhaustion and a denial of service.

Affected applications are those using the undici WebSocket client (new WebSocket(...)) or the WebSocketStream API that can be induced to connect to an attacker-controlled or compromised WebSocket endpoint.

All releases starting at undici 6.17.0 are affected.

Patches: Upgrade to undici >= 6.26.0, >= 7.28.0, or >= 8.5.0. Workarounds: No workaround is available. The fix must be applied through an upgrade.

Weakness: CWE-770, CWE-400

Which versions are affected by CVE-2026-12151?

6 open source packages ship an affected version, including undici. It affects 1 product.

PackageAffectedFixed in
undici npmAll versions6.27.0
undici npmAll versions6.27.0
undici npmFrom 7.0.07.28.0
undici npmFrom 7.0.07.28.0
undici npmFrom 8.0.08.5.0
undici npmFrom 8.0.08.5.0

Products include Nodejs Undici.

How do I fix CVE-2026-12151?

Upgrade undici to a fixed version for your release line: 6.27.0, 7.28.0 or 8.5.0.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-12151 being exploited?

There is no known exploitation of CVE-2026-12151 in the wild and no public exploit code.

All Nodejs Undici vulnerabilities

Sources

Also known as AZL-91191, CLEANSTART-2026-CY92802, CLEANSTART-2026-PM31207, DEBIAN-CVE-2026-12151, ECHO-f2ce-9c62-59ce, GHSA-vxpw-j846-p89q and 21 more.

Is CVE-2026-12151 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free