All vulnerabilities

npm

CVE-2026-140000

websocket-driver: Memory exhaustion triggered by small fragment frames holding long-lived references to TCP reads

Severity
High 7.5
Published
3 Dec 2026
Last changed
3 Dec 2026
Added to UpHeron
3 Dec 2026
Fixed in
0.8.2
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-j7r2-xppq-m353
Sources
OSV.dev and GitHub

Description

With the default configuration options, an unauthenticated remote client is able to force the server to retain large Buffer objects in memory far longer than necessary, by sending it a series of small fragment frames embedded in larger chunks of TCP input. This can cause substantial memory inflation and lead to the server running out of memory and crashing.

websocket-driver handles incoming TCP input via a pipe() call that feeds Buffer objects read from a TCP stream into the driver. A class named StreamReader stores the sequence of received buffers in an array and its read(length) method is used by the parser to consume arbitrary-sized chunks of the input stream.

If the requested length is smaller than the length of the first Buffer in the input queue, the Buffer.slice() method is used to take a reference to a slice of that Buffer without copying it. Since slice() takes a reference to the source Buffer, the source is not garbage collected until all slices taken from it are dropped.

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

About websocket-driver

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

References