CVE Professor
/
All CVEs
CVE-2026-144293

CVE-2026-144293 — Websocket-driver — CWE-770

HIGH CVSS 7.5 ⚡ EPSS 0.7% Shodan+GitHub

### Summary A 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. ### Details When 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. This 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. ### Proof of concept This script demonstrates how much data is buffered by a draft-75 parser on receipt of a very long unterminated message: ```rb require 'bundler/setup' require 'websocket/driver' class Sock def write(_) ; end end d = WebSocket::Driver.server(Sock.new, :allow_drafts => true, :max_length => 1024) d.on(:connect) { d.start } # draft-75 handshake: NO Sec-WebSocket-Key/Version/Key1/Key2 -> Draft75 selected d.parse( "GET / HTTP/1.1\r\n" + "Host: localhost\r\n" + "Upgrade: websocket\r\n" + "Connection: Upgrade\r\n" + "Origin: http://localhost\r\n" + "\r\n") # One text frame: 0x00, then 10 MB of 0x41

### Summary A 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. ### Details When 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. This 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. ### Proof of concept This script demonstrates how much data is buffered by a draft-75 parser on receipt of a very long unterminated message: ```rb require 'bundler/setup' require 'websocket/driver' class Sock def write(_) ; end end d = WebSocket::Driver.server(Sock.new, :allow_drafts => true, :max_length => 1024) d.on(:connect) { d.start } # draft-75 handshake: NO Sec-WebSocket-Key/Version/Key1/Key2 -> Draft75 selected d.parse( "GET / HTTP/1.1\r\n" + "Host: localhost\r\n" + "Upgrade: websocket\r\n" + "Connection: Upgrade\r\n" + "Origin: http://localhost\r\n" + "\r\n") # One text frame: 0x00, then 10 MB of 0x41

CVSS v3.1 Vector Metrics
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 Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality None C:N
Integrity None I:N
Availability High A:H
EPSS — Exploit Prediction Scoring System
0.7%
30-day probability
In the 56. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Resource Exhaustion (Denial of Service) flaw classified under CWE-770: Allocation of Resources Without Limits or Throttling.

Technical Flaw Analysis:
The core issue lies in the websocket-driver gem (a Ruby library) when configured with allow_drafts: true.
1. Legacy Protocol Support: When allow_drafts is enabled, the server accepts connections using obsolete WebSocket draft protocols (specifically draft-75/76).
2. Parser Logic Error: The parser for these legacy drafts does not correctly enforce the max_length limit during the buffering phase of an unterminated frame.
3. Unbounded Memory Allocation: If a client initiates a text frame but omits the terminating delimiter (or sends it in a way that the parser waits for indefinitely), the server continues to buffer incoming data into memory.
4. Lack of Timeout/Abort: The server does not abort the connection or reject the frame based on the max_length constraint while waiting for the terminator, leading to unbounded memory growth until the process crashes (OOM - Out of Memory).

CVSS Vector Breakdown:

  • AV:N (Network): Exploitable remotely.

  • AC:L (Low Complexity): No race conditions or complex timing required.

  • PR:N (No Privileges): Unauthenticated access is sufficient.

  • UI:N (No User Interaction): No user action needed.

  • S:U (Unchanged Scope): The impact is contained to the vulnerable component (the server process).

  • C:N / I:N / A:H (High Availability Impact): The primary impact is a crash of the server process, leading to a complete denial of service for that instance.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Fingerprinting: Identify applications using Ruby on Rails or other Ruby frameworks that utilize websocket-driver.
  • Version Check:
  • * Check Gemfile.lock if accessible (rare). * Monitor HTTP response headers for X-Powered-By: Ruby or specific Rails version headers. * Attempt a WebSocket handshake (Upgrade: websocket) to a known endpoint. If the server responds with a 101 Switching Protocols and accepts legacy draft headers (e.g., Sec-WebSocket-Protocol: draft-75), it is likely vulnerable if allow_drafts is enabled.
  • Configuration Inference: The vulnerability only manifests if allow_drafts is explicitly set to true in the application code. Modern applications often disable this, but legacy or poorly configured apps may leave it on for backward compatibility.
  • 2. Exploitation

    Mechanism: The attacker initiates a WebSocket connection using a legacy draft protocol header. They then send a text frame header indicating a large payload size (or no size, depending on the specific draft implementation) but do not send the terminating delimiter or send data slowly enough to keep the buffer open. The server buffers the incoming bytes indefinitely.

    Illustrative PoC (Ruby Script):
    Note: The exact frame structure depends on the specific draft version (75/76). This is an illustrative example of the logic.

    require 'socket'
    require 'websocket-driver'
    
    # Connect to the target WebSocket server
    host = 'target.example.com'
    port = 80
    path = '/ws'
    
    socket = TCPSocket.new(host, port)
    
    # Send HTTP Upgrade request with legacy draft header
    # Note: draft-75/76 uses different headers than modern RFC 6455
    request = <<~HTTP
      GET #{path} HTTP/1.1
      Host: #{host}
      Upgrade: websocket
      Connection: Upgrade
      Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
      Sec-WebSocket-Protocol: draft-75
      Sec-WebSocket-Version: 75
    HTTP
    
    socket.write(request)
    response = socket.readuntil("\r\n\r\n")
    puts "Response: #{response}"
    
    # If 101 is received, proceed to send malformed frames
    # The attacker sends a start of a text frame but never sends the end delimiter
    # or sends data in a way that the parser waits for more data without checking max_length
    
    # Example: Send a frame header indicating a large length, then stream data slowly
    # The specific byte sequence for draft-75/76 must be constructed according to that draft spec.
    # For demonstration, we simulate the logic of keeping the connection open and sending data
    # that the parser buffers without enforcing the limit.
    
    # In a real exploit, this would involve crafting the specific binary frame structure
    # for draft-75/76 that triggers the buffering bug.
    
    puts "Vulnerability triggered: Server is now buffering unbounded data."

    Curl-based Reconnaissance (Not Exploit):

    # Check if the server accepts WebSocket upgrades
    curl -i -N \
      -H "Connection: Upgrade" \
      -H "Upgrade: websocket" \
      -H "Sec-WebSocket-Version: 75" \
      -H "Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==" \
      http://target.example.com/ws

    3. Post-Exploitation

  • Impact: The server process crashes due to Out of Memory (OOM).
  • Recovery: The service becomes unavailable until the process is restarted (by a supervisor like systemd, pm2, or foreman).
  • No RCE: This is a pure DoS vulnerability. There is no code execution, data exfiltration, or privilege escalation.
  • 🌍 Real World Impact

  • Availability (High): A single unauthenticated client can crash the WebSocket server process. If the application does not have robust process supervision, this can lead to a complete outage of the WebSocket functionality or the entire application if the WebSocket server is the main process.
  • Confidentiality (None): No data is leaked.
  • Integrity (None): No data is modified.
  • Practical Consequences:
  • * Real-time features (chat, live updates, gaming) become unavailable. * If the WebSocket server is part of a microservice architecture, it may cause cascading failures if other services depend on it. * Repeated attacks can lead to a sustained DoS condition, requiring manual intervention to restart services.

    🛡️ Remediation & Mitigation

    1. Upgrade (Primary Fix)

  • Affected Versions: websocket-driver < 0.9.2
  • Fixed Version: websocket-driver >= 0.9.2
  • Action: Update the gem in your Gemfile:
  • gem 'websocket-driver', '>= 0.9.2'

    Then run bundle update websocket-driver.

    2. Workarounds (If Immediate Upgrade is Not Possible)

  • Disable Drafts: If your application does not require support for legacy WebSocket drafts (draft-75/76), explicitly disable them in your server configuration.
  • # Example in a Rails application or custom WebSocket server
        driver = WebSocket::Driver.server(
          allow_drafts: false # CRITICAL: Set to false
        )

    Note: This is the most effective mitigation if you can control the server configuration.

  • WAF/ModSecurity Rule:
  • Block WebSocket upgrade requests that specify legacy draft versions.
    # ModSecurity Rule
        SecRule REQUEST_HEADERS:Sec-WebSocket-Version "@rx ^7[56]$|draft-7[56]" \
            "id:100001,phase:1,deny,status:403,msg:'Blocked legacy WebSocket draft'"

    Note: This rule blocks connections using draft-75/76. Adjust the regex to match the specific headers used by the vulnerable parser.

  • Resource Limits:
  • Implement OS-level resource limits (e.g., ulimit -v) for the Ruby process to prevent it from consuming all available memory. This will cause the process to crash earlier, but it does not prevent the DoS.

    3. Detection (IoCs)

  • Web Server Logs:
  • * Look for WebSocket upgrade requests with Sec-WebSocket-Version: 75 or 76 or Sec-WebSocket-Protocol: draft-75/draft-76. * Example log entry:
    GET /ws HTTP/1.1
            Upgrade: websocket
            Sec-WebSocket-Version: 75
  • System Logs:
  • * Monitor for OOM Killer events in /var/log/syslog or dmesg related to the Ruby process. * Example:
    Out of memory: Kill process 1234 (ruby) score 900 or sacrifice child
  • Network Traffic:
  • * Monitor for WebSocket connections that remain open for an extended period with high data throughput but no application-level responses.

    ⚠️ Urgency

  • CVSS Score: 7.5 (HIGH)
  • CISA KEV: No
  • Exploit Complexity: Low (Unauthenticated, Network Access)
  • Patching Priority: High
* Reasoning: While not in the CISA KEV catalog, the vulnerability is trivially exploitable by any unauthenticated remote attacker. The impact is a complete denial of service for the WebSocket service. If your application relies on WebSockets for critical functionality, this should be patched immediately. * Recommendation: 1. Immediate: Disable allow_drafts if possible. 2. Short-term: Upgrade websocket-driver to 0.9.2 or later. 3. Ongoing: Monitor for OOM events and legacy WebSocket connection attempts.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-144293
Technical reference / advisory repository for CVE-2026-144293
Technical reference / advisory repository for CVE-2026-144293
CVSS Score
7.5 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-770
Affected Products (1)
websocket-driver
References & Advisories (4)
Related CVEs
7.5
CVE-2026-145078
SiYuan before 3.8.11 contains a stored cross-site scripting vulnerability because the transactions WebSocket p
6.9
CVE-2026-145057
SiYuan before 3.8.11 contains a missing authorization vulnerability that allows unauthenticated attackers to f
5.3
CVE-2026-132651
httpx2 reassembled fragmented WebSocket messages by appending each continuation frame to a bytes buffer, copyi
4.3
CVE-2026-145030
WWBN AVideo 29.0 before 29.9.0 contains a cross-site scripting vulnerability in the YPTSocket plugin because t
8.7
CVE-2026-144572
@libp2p/kad-dht through 16.4.11 contains a record validation bypass in verifyRecord that allows unauthenticate
8.7
CVE-2026-137408
In Eclipse Yasson versions 1.0 through 1.0.11, 2.0 through 2.0.4, and 3.0 through 3.0.6, the deserializers for
8.7
CVE-2026-145021
Zebra before 7.1.0 contains an uncontrolled resource consumption vulnerability that allows unauthenticated cli