Critical · 9.1 Node.js & npm GHSA-v36f-rjg3-3v46 CVE-2026-140004
websocket-driver: Crafted Legacy WebSocket Message Enables Remote Denial of Service
A vulnerability in the websocket-driver npm package allows an unauthenticated remote client to crash a server process or cause message duplication by sending a crafted byte sequence over a legacy WebSocket connection. The issue is fixed in version 0.8.0.
By PatchBriefing · ·
Produced automatically from official sources with the help of AI. How we work →
AI summary
A vulnerability has been disclosed in websocket-driver, a WebSocket protocol handler library used in Node.js applications. The flaw affects how the library parses messages for older WebSocket protocol variants and can be triggered remotely without authentication, resulting in denial of service or message corruption on the receiving end.
What happened
A bug was identified in the message parser of websocket-driver that handles the legacy draft75 and draft76 WebSocket protocol variants. The parser mishandles a short, specially crafted byte sequence sent by a client. Depending on circumstances, this can cause a received message to be emitted twice (message corruption) or cause the server process handling the connection to crash (denial of service).
Technical cause
The root cause is an uncaught exception condition (CWE-248) in the parsing logic for draft75 and draft76 WebSocket messages. A crafted byte sequence sent over a legacy WebSocket connection is not correctly validated or handled, leading to an unhandled error state in the parser.
Why it matters
The vulnerability can be triggered by an unauthenticated remote client with no user interaction required, simply by establishing a legacy WebSocket connection and sending the crafted sequence. This makes exploitation straightforward for any attacker who can reach a vulnerable server, and can result in service outages or corrupted message delivery.
Who is affected
Applications and services using the websocket-driver npm package that accept legacy draft75 or draft76 WebSocket connections are affected. This includes server-side Node.js code relying on the library for WebSocket protocol handling.
Affected versions
All versions of websocket-driver prior to 0.8.0 are affected. The vulnerability is fixed starting with version 0.8.0.
Fixes and mitigation
The issue is resolved in websocket-driver version 0.8.0. Users should upgrade to this version or later to remediate the vulnerability.
Recommended action
Upgrade the websocket-driver dependency to version 0.8.0 or later in all affected Node.js projects. Where immediate upgrading is not possible, consider disabling or restricting support for legacy draft75/draft76 WebSocket connections if your application does not require them, and monitor for unexpected process crashes.
PatchBriefing score
9.1 / 10 · Critical
Official CVSS: 9.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
EPSS 0.0064 (52 percentile)
Why this score
The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.
Affected versions
- websocket-driver < 0.8.0
- vulnerable
- websocket-driver ≥ 0 < 0.8.0
- vulnerable
- ≥ 0.8.0
- patched
Reported fixes
The issue is resolved in websocket-driver version 0.8.0. Users should upgrade to this version or later to remediate the vulnerability.
How this was built
3 source records were collected, matched and used to prepare the report above.
-
NVD (NIST) database
-
CVE.org database
-
GitHub Advisory Database database
Revision history
- Published
- Generated
- Published
- Early Warning