Summary
CVE-2026-61666 is a denial-of-service vulnerability in websocket-driver-ruby (the websocket-driver RubyGem maintained by Faye), caused by an uncaught URI::InvalidURIError exception when parsing a malformed Host header. The flaw affects WebSocket server implementations built on top of a raw TCP server using WebSocket::Driver.server(), and carries a severity score of 8.9 (High).
Technical details
- Root cause:
WebSocket::Driver.server()passes the client-suppliedHostheader directly to Ruby’sURI.parsewithout catching theURI::InvalidURIErrorexception (CWE-248: Uncaught Exception). - Trigger condition: A remote client sends a WebSocket handshake request with a
Hostheader that does not conform to the expectedhost[:port]format. - Attack vector: Network — no authentication or user interaction is required; the malicious request can be sent directly to any exposed WebSocket endpoint using the vulnerable driver in TCP-server mode.
- Impact: If the hosting application does not itself catch the exception raised from the driver’s
parse()method, the unhandled error can crash the server process, resulting in a denial of service for the affected service. - No known workarounds exist other than upgrading; applications could theoretically wrap calls to the driver’s
parse()method in their own exception handling, but this is not an officially endorsed mitigation.
Affected software
- Product: websocket-driver-ruby (RubyGem:
websocket-driver) - Vendor: Faye
- Vulnerable versions: < 0.8.2
- Fixed version: 0.8.2 and later
Severity
- CVSS Score: 8.9 (High)
- Vector (CVSS v4.0):
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H - Key metrics: Network attack vector, low attack complexity, no privileges or user interaction required, high impact to availability, no impact to confidentiality or integrity.
- Note: At the time of writing, this CVE has not yet been fully populated in the NVD database (record pending); the score above reflects the CVSS v4.0 vector published in the vendor’s GitHub Security Advisory.
Mitigation and recommended actions
- Immediate: Upgrade
websocket-driverto version 0.8.2 or later, where the request parser now catchesURI::InvalidURIErrorand treats a malformedHostheader as an invalid request, refusing to establish the WebSocket connection instead of crashing. - If immediate patching is not possible: Ensure the application layer wraps calls to the driver’s handshake/parsing methods in exception handling so an unexpected
URI::InvalidURIErrorcannot propagate and crash the server process. This is a defense-in-depth measure only — no official workaround has been published, and upgrading remains the recommended fix. - Review dependency manifests (Gemfile/Gemfile.lock) for transitive use of
websocket-drivervia frameworks such asfaye-websocket,em-websocket, or ActionCable, and confirm the resolved version is 0.8.2 or later.

