CVE-2026-140000: 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
websocket-driverto a version that resolves this vulnerability.Fixed in 0.8.2
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Servers using the npm websocket-driver package before version 0.8.2 are affected. The vulnerable behavior is in WebSocket input handling, so a server that accepts WebSocket connections from remote clients is exposed.
What does an attacker need to do to exploit it?
An unauthenticated remote client can send small fragmented WebSocket message frames. The fragments cause long-lived references to larger TCP input buffers, inflating memory use until server memory may be exhausted.
Does upgrading to 0.8.1 fully resolve the problem?
No. Version 0.8.1 compacts retained data only after 1,000,000 fragments and can still retain up to 1,000,000 TCP inputs. The issue is fixed in version 0.8.2.
How can I determine whether I am affected?
Check the installed version of npm/websocket-driver. Versions earlier than 0.8.2 are affected; systems running 0.8.1 still have the residual retention behavior described in the advisory.