CVE-2026-12151 undici WebSocket client vulnerable to denial of service via fragment count bypass
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.
Which versions are affected by CVE-2026-12151?
6 open source packages ship an affected version, including undici. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
undici npm | All versions | 6.27.0 |
undici npm | All versions | 6.27.0 |
undici npm | From 7.0.0 | 7.28.0 |
undici npm | From 7.0.0 | 7.28.0 |
undici npm | From 8.0.0 | 8.5.0 |
undici npm | From 8.0.0 | 8.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.
Other vulnerabilities in Nodejs Undici
- CVE-2026-109855 undici WebSocket client vulnerable to Denial of Service via failed HTTP/2 handshake
- CVE-2026-109869 undici vulnerable to Denial of Service via unhandled error on excessive content-encodings
- CVE-2026-87018 undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation
- CVE-2026-19534 undici vulnerable to Denial of Service via unrequested WebSocket subprotocol
- CVE-2026-6734 undici vulnerable to cross-origin request routing via SOCKS5 proxy pool reuse
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.