CVE-2026-62389: websockets ws memory exhaustion in lib/receiver.js

CVE-2026-62389 · Severity: high · CVSS 7.5 · Published 2026-07-15

The 'ws' library, a popular WebSocket implementation for Node.js, is vulnerable to a denial-of-service attack. An unauthenticated remote attacker can crash a server by sending a large number of incomplete message fragments, which exhausts the server's available memory. This can lead to service outages and impact the availability of applications relying on this library for real-time communication.

Quick answers

Is CVE-2026-62389 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-62389 being exploited in the wild.
How severe is CVE-2026-62389?
High severity, with a CVSS score of 7.5, published 15 July 2026.
Which products and versions are affected?
websockets ws < 8.21.1.
Is there a fix for CVE-2026-62389?
A patch was published on 2026-07-14: Version 8.21.1 released. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-62389 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-62389?
Check whether anything you run is named in the advisory. 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.

Technical details

A memory exhaustion vulnerability exists in the 'ws' library's receiver logic (lib/receiver.js) due to insufficient default limits on message fragments. An attacker can initiate a text frame with the FIN bit set to 0 and follow it with numerous small continuation frames without ever completing the sequence. Because each fragment is stored as a separate Buffer object with significant internal overhead, the server's heap memory can be exhausted even if the total payload size remains below the 'maxPayload' limit. The vulnerability is exploited by keeping the fragment count just below the default 'maxFragments' threshold across multiple concurrent connections. The issue is addressed in version 8.21.1 by lowering the default values for 'maxBufferedChunks' and 'maxFragments' and ensuring empty fragments are counted toward these limits.

Affected products

  • websockets ws < 8.21.1

Timeline

  • 2026-06-04: disclosed: Vulnerability reported to maintainers via email.
  • 2026-07-14: patched: Version 8.21.1 released.
  • 2026-07-15: advisory: CVE-2026-62389 published.

References

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