All vulnerabilities

npm

CVE-2026-140001

websocket-driver: Memory exhaustion triggered by buffering of zero-length fragmented frames

Severity
High 7.5
Published
1 Dec 2026
Last changed
1 Dec 2026
Added to UpHeron
1 Dec 2026
Fixed in
0.8.1
Exploit chance
0.5% in the next 30 daysHigher than 45% of CVEs. EPSS by FIRST, 1 Dec 2026
Weakness
Uncontrolled resource consumption (CWE-400)Allocation without limits (CWE-770)
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-7487-9gcw-9w8w
Sources
OSV.dev and GitHub

Description

A server accepting WebSocket connections using websocket-driver can be made to run out of memory by a client sending an indefinite stream of zero-length fragmented message frames.

The WebSocket protocol allows messages to be delivered as a series of "fragment" frames. websocket-driver buffers all the individual fragments it receives and then concatenates them all when the final fragment is received. By sending a stream of zero-length fragment frames, a client can make the driver store a growing array of zero-length Buffer objects in memory, eventually causing it to run out of heap space.

This has been mitigated by discarding zero-length fragments when buffering, and by concatenating all received buffers when the number received reaches a certain amount, specifically 1,000,000. websocket-driver does not concatenate buffers on every received frame as this would result in O(n²) time to process a series of frame fragments, as all the data received so far would need to be copied for…

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
websocket-drivernpm · osv:npm:websocket-driver
  • Every version before 0.8.1

About websocket-driver

Weekly downloads (npm)
39,177,273npm, 1 Dec 2026

References