npm
CVE-2026-140002
websocket-driver: Memory exhaustion triggered by buffering of data received after socket is closed
- 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.6% in the next 30 daysHigher than 51% of CVEs. EPSS by FIRST, 1 Dec 2026
- 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-v674-7268-hvqh
- Sources
- OSV.dev and GitHub
Description
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.
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.
Affected software
| Software | Affected versions |
|---|---|
websocket-drivernpm · osv:npm:websocket-driver |
|
About websocket-driver
- Weekly downloads (npm)
- 39,177,273npm, 1 Dec 2026
Vulnerabilities in websocket-driver
- In our list
- 6
- Published in the last 12 months
- 6
- Critical, last 12 months
- 1
- High, last 12 months
- 5
- Known exploited
- 0
- CVE-2026-140001websocket-driver: Memory exhaustion triggered by buffering of zero-length fragmented framesHigh 7.5 1 Dec 2026
- CVE-2026-140003websocket-driver: Denial of service triggered by malformed Sec-WebSocket-Key1 headerHigh 7.5 1 Dec 2026
- CVE-2026-140004websocket-driver: Message corruption and denial of service triggered by crafted client messageCritical 9.1 1 Dec 2026
- CVE-2026-140005websocket-driver: Denial of service triggered by client sending a single pong frameHigh 7.5 1 Dec 2026
- CVE-2026-134813Faye websocket-driver 0.5.0 before 0.8.0 Decompression Bomb via permessage-deflateHigh 8.7 22 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-140002
- GitHub Advisory Database https://github.com/advisories/GHSA-v674-7268-hvqh