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

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). 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.