All vulnerabilities

npm

CVE-2026-140003

websocket-driver: Denial of service triggered by malformed Sec-WebSocket-Key1 header

Severity
High 7.5
Published
1 Dec 2026
Last changed
1 Dec 2026
Added to UpHeron
1 Dec 2026
Fixed in
0.8.0
Exploit chance
0.6% in the next 30 daysHigher than 51% of CVEs. EPSS by FIRST, 1 Dec 2026
Weakness
Uncaught exception (CWE-248)
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-c4gv-fww2-jp3r
Sources
OSV.dev and GitHub

Description

An unauthenticated remote client can trigger an instant crash and denial of service by sending a WebSocket draft76 handshake with specially crafted headers.

The websocket-driver library supports earlier versions of the WebSocket protocol from before the RFC was standardised, particularly the draft75 and draft76 versions. The draft76 version's handshake involves the client sending two headers named Sec-WebSocket-Key1 and Sec-WebSocket-Key2. A value is derived from each of these by extracting digits from them and dividing this value by the number of spaces in the header string. The derived values are each written into a buffer which is then hashed, and this process expects the values to fit inside 32 bits.

If the values are larger than 32 bits, this triggers an exception in Node's Buffer module and this causes the process to crash.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
websocket-drivernpm · osv:npm:websocket-driver
  • Every version before 0.8.0

About websocket-driver

Weekly downloads (npm)
39,177,273npm, 1 Dec 2026

References