# CVE-2026-12151: Node.js undici denial of service in WebSocket fragment handling

Source: https://junglewise.ai/threats/cve-2026-12151-node-js-undici-denial-of-service-in-websocket-fragment-handling  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-17. Updated: 2026-06-20  
License: CC BY 4.0 with a link back

CVE-2026-12151 · Severity: high · CVSS 7.5 · Published 2026-06-17

Undici is a popular HTTP and WebSocket client for Node.js used to fetch data and maintain real-time connections. A vulnerability in its WebSocket implementation allows a malicious server to crash the client application by sending an infinite stream of small data fragments. This leads to memory exhaustion, causing the application to stop responding or shut down entirely.

Technologies: [undici (npm)](https://junglewise.ai/threats/technologies/undici). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-12151 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-12151 being exploited in the wild.

**How severe is CVE-2026-12151?** High severity, with a CVSS score of 7.5, published 17 June 2026.

**Which products and versions are affected?** undici (npm) SEMVER:introduced=0,fixed=6.27.0.

**Is there a fix for CVE-2026-12151?** Yes. undici (npm): upgrade to 6.27.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-12151 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-12151?** Check whether you run undici (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- undici (npm): upgrade to 6.27.0 or later

  ```sh
  npm install undici@6.27.0
  ```


## Technical details

The undici WebSocket client (including the WebSocketStream API) fails to enforce a limit on the number of fragments within a single message. While it validates the cumulative byte count against 'maxPayloadSize', it does not restrict the total count of continuation frames. An attacker-controlled WebSocket server can exploit this by streaming a large volume of small or empty frames. This bypasses per-frame and cumulative size checks while causing the client to allocate memory for each fragment's metadata, leading to memory exhaustion (CWE-400/CWE-770) and a process crash. The vulnerability is fixed in versions 6.27.0, 7.28.0, and 8.5.0.

## Affected products

- Node.js undici >= 6.17.0, < 6.27.0; >= 7.0.0, < 7.28.0; >= 8.0.0, < 8.5.0

## Identifiers

- CVE-2026-12151
- GHSA-vxpw-j846-p89q

## Timeline

- 2026-06-17: disclosed
- 2026-06-17: advisory
- 2026-06-17: patched

## References

- [https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
- [https://github.com/nodejs/undici/security/advisories/GHSA-vxpw-j846-p89q](https://github.com/nodejs/undici/security/advisories/GHSA-vxpw-j846-p89q)

## Related threats

- [undici HTTP client denial of service in decompress interceptor](https://junglewise.ai/threats/cve-2026-87029-undici-is-an-http-client-library-for-node-js-in-versions-7-15-0)
- [undici denial of service via TLS 1.2 certificate renegotiation](https://junglewise.ai/threats/cve-2026-87018-undici-is-an-http-client-library-for-node-js-in-versions-4-2-1)
- [undici WebSocket client denial of service via unbounded PONG buffering](https://junglewise.ai/threats/cve-2026-109932-undici-is-an-http-client-library-for-node-js-in-versions-5-15-0)
- [undici EventSource memory exhaustion denial of service](https://junglewise.ai/threats/cve-2026-109924-undici-is-an-http-client-library-for-node-js-in-versions-6-5-0)
- [undici HTTP client denial of service via excessive content-encodings](https://junglewise.ai/threats/cve-2026-109869-undici-is-an-http-client-library-for-node-js-in-versions-6-23-0)
