CVE-2026-140002
### Summary A WebSocket server implemented using `websocket-driver` can be made to buffer data in memory indefinitely by a client that connects, sends a single close frame, and then leaves its side of the connection open while it continues to send more data over the connection. ### Details When used as documented, a server handles WebSocket connections by piping all bytes received over a TCP socket into the `driver` object provided by this library. On receipt of a WebSocket close frame, the driver emits a `close` event, which the caller should handle by closing the TCP socket. However, since TCP allows sockets to remain half-open, the client can keep its side of the socket open and keep sending data. Due to the state the driver enters after the `close` event, this data will be buffered in memory but never consumed by the parser. An attacker can exploit this by sending an indefinite stream of bytes over the socket until it causes the server to run out of memory. This has been mitigated by destroying the buffer when the socket undergoes any failure event, including an explicit close. The buffer is dereferenced and no further data will be added to it, and it should eventually be garbage collected along with the rest of the connection objects. ### Proof of concept Given a server accepting WebSocket connections using `websocket-driver`: ```js const net = require("net") const websocket = require("websocket-driver") const server = net.createServer((connection) => { let driver = websocket.server({ maxLength: 1024 }) driver.on("connect", () => { if (websocket.isWebSocket(driver)) driver.start() }) driver.on("close", () => connection.end()) connection.pipe(driver.io).pipe(connection) }) server.listen(5083, "127.0.0.1") ``` A client can connect to this server, send a WebSocket close frame, and then keep sending more data over the same connection, after the server has closed its side of the connection. ```js const net = require("net") let socket = ne
Properties
- Severity
- high
- Summary
- websocket-driver: Memory exhaustion triggered by buffering of data received after socket is closed
- Nvd fetched at
- 2026-12-02T06:37:54.190518+00:00
- Epss score
- 0.00621
- Cvss severity
- HIGH
- Cvss score
- 7.5
- Retrieved at
- 2026-12-02T06:40:14+00:00
- Ghsa published
- 2026-12-01T19:10:56Z
- Source url
- https://github.com/advisories/GHSA-v674-7268-hvqh
- Ghsa updated
- 2026-12-01T19:11:00Z
- Ghsa id
- GHSA-v674-7268-hvqh
- Last source
- FIRST EPSS
- Score
- 7.5
- Cvss version
- 3.1
- Cve id
- CVE-2026-140002
- Cvss vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- First seen by Signal
- 2026-11-30T22:28:40+00:00
- Name
- CVE-2026-140002
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Related Entities (3)
AFFECTS (1)
HAS_WEAKNESS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph