{"id":"CVE-2026-61666","kind":"vulnerability","aliases":["CVE-2026-61666","GHSA-2x63-gw47-w4mm"],"related":[],"title":"websocket-driver-ruby: Denial of service via malformed Host header","description":"### Impact\n\nIf this library is used to implement a WebSocket server on top of a TCP server, by using the `WebSocket::Driver.server()` method, then a client can cause the server to crash by sending a `Host` header that is not a valid `host[:port]` string. When this happens, a `URI::InvalidURIError` exception is raised which is not caught, and this can cause the server process to crash if the application does not catch the error from the `parse()` method itself.\n\n### Patches\n\nThe issue has been patched in version 0.8.2 by making the request parser catch `URI::InvalidURIError` and enter an error state if the `Host` header is malformed. This means the request is considered invalid and should not establish a WebSocket connection.\n\n### Workarounds\n\nNo known workarounds exist.\n\n### Acknowledgements\n\nThis issue was discovered and reported by Pranjali Thakur, DepthFirst Security Research Team.","summary":"The websocket-driver Ruby gem raises an uncaught URI::InvalidURIError when a client sends a Host header that is not a valid host[:port] string. An unauthenticated remote client can crash the server process when the application does not catch the error from parse().","severity":"high","cvss":8.9,"epss":0.00445,"exploited":false,"exploited_at":null,"products":[{"name":"websocket-driver","fixed":["0.8.2"],"affected":"< 0.8.2","ecosystem":"rubygems"}],"ecosystems":["rubygems"],"tags":["cwe-248","package","ruby","self-hosted","websocket"],"not_affected_if":["client-only","errors-caught-in-parse","no-driver-server"],"how_to_check":"- Check the locked gem version in `Gemfile.lock` for `websocket-driver`\n- Look for calls to `WebSocket::Driver.server()` in your code\n- Confirm whether your application rescues errors raised from the driver's `parse()` method","fix":"- `websocket-driver` (rubygems) upgrade to `0.8.2` or later; affected versions are below `0.8.2`","status":"open","published_at":"2026-07-21T18:34:42+00:00","first_seen_at":"2026-11-02T21:11:48+00:00","triaged_at":"2026-11-02T21:11:57+00:00","updated_at":"2026-11-02T21:35:41+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-11-02T21:11:57Z","model":"claude-haiku-5-5","output":{"fix":"- `websocket-driver` (rubygems) upgrade to `0.8.2` or later; affected versions are below `0.8.2`","reach":"network","title":"websocket-driver-ruby: malformed Host header crashes WebSocket servers","impact":"low","summary":"The websocket-driver Ruby gem raises an uncaught URI::InvalidURIError when a client sends a Host header that is not a valid host[:port] string. An unauthenticated remote client can crash the server process when the application does not catch the error from parse().","audience":"developers","category":"package","nicknames":[],"who_cares":["ruby","websocket","self-hosted"],"confidence":0.85,"fix_status":"available","needs_auth":"no","worst_case":"remote client crashes the WebSocket server process","analyst_note":"","how_to_check":"- Check the locked gem version in `Gemfile.lock` for `websocket-driver`\n- Look for calls to `WebSocket::Driver.server()` in your code\n- Confirm whether your application rescues errors raised from the driver's `parse()` method","plain_action":"","needs_analyst":false,"not_affected_if":["client-only","no-driver-server","errors-caught-in-parse"],"who_is_affected":"Applications that use WebSocket::Driver.server() to run a WebSocket server on top of a TCP server are exposed, because a malformed Host header reaches the parser. Applications that only act as WebSocket clients or do not use the server method are not in the described path. Crashes only occur when the application does not catch the error from parse().","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000723,"input_tokens":4400,"output_tokens":565,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':13A,21A '-248':27B '-61666':14A,22A '0.8.2':167C '2x63':17A 'acknowledg':206C 'applic':71B,148C 'catch':74B,151C,173C 'caught':136C 'caus':106C,140C 'client':47B,63B,104C 'connect':200C 'consid':192C 'crash':65B,110C,145C 'cve':12A,20A 'cwe':26B 'denial':5A 'depthfirst':216C 'discov':210C 'driver':3A,25A,37B 'driver.server':100C 'enter':177C 'error':76B,153C,179C 'establish':197C 'except':130C 'exist':205C 'gem':39B 'ghsa':16A 'ghsa-2x63-gw47-w4mm':15A 'gw47':18A 'happen':126C 'header':11A,51B,115C,184C 'host':10A,32B,50B,57B,114C,121C,183C 'impact':79C 'implement':86C 'invalid':193C 'invalidurierror':44B,129C,175C 'issu':161C,208C 'known':203C 'librari':82C 'make':169C 'malform':9A,186C 'mean':188C 'method':101C,157C 'packag':28B 'pars':78B,156C 'parser':172C 'patch':159C,164C 'port':58B,122C 'pranjali':214C 'process':68B,143C 'rais':40B,132C 'remot':62B 'report':212C 'request':171C,190C 'research':218C 'rubi':4A,29B,38B 'secur':217C 'self':31B 'self-host':30B 'send':48B,112C 'server':67B,89C,95C,108C,142C 'servic':7A 'state':180C 'string':59B,123C 'tcp':94C 'team':219C 'thakur':215C 'top':91C 'unauthent':61B 'uncaught':42B 'uri':43B,128C,174C 'use':84C,97C 'valid':56B,120C 'version':166C 'via':8A 'w4mm':19A 'websocket':2A,24A,33B,36B,88C,99C,199C 'websocket-driv':35B 'websocket-driver':23A 'websocket-driver-rubi':1A 'workaround':201C,204C","nicknames":[],"mitigations":[],"who_affected":"Applications that use WebSocket::Driver.server() to run a WebSocket server on top of a TCP server are exposed, because a malformed Host header reaches the parser. Applications that only act as WebSocket clients or do not use the server method are not in the described path. Crashes only occur when the application does not catch the error from parse().","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["websocketdriver"],"ptokens":["driver","websocket"],"labels":["cwe248","high","package","ruby","rubygems","selfhosted","websocket"],"first_public_at":"2026-06-23T11:37:14+00:00","kev":null,"cvss_vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-2x63-gw47-w4mm","url":"https://github.com/advisories/GHSA-2x63-gw47-w4mm","severity":"high","published_at":"2026-07-21T18:34:42+00:00","modified_at":"2026-11-02T21:07:39+00:00","first_seen_at":"2026-11-02T21:11:48+00:00","fetched_at":"2026-11-02T22:08:14+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-61666","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61666","severity":null,"published_at":"2026-08-17T17:16:39+00:00","modified_at":"2026-10-23T16:10:00+00:00","first_seen_at":"2026-11-02T21:35:41+00:00","fetched_at":"2026-11-02T21:35:41+00:00","note":null}],"documents":[{"id":53901,"url":"https://api.github.com/repos/faye/websocket-driver-ruby/security-advisories/GHSA-2x63-gw47-w4mm","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"},{"id":53902,"url":"https://github.com/faye/websocket-driver-ruby/security/advisories/GHSA-2x63-gw47-w4mm","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2026-06-23T11:37:14+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":53903,"url":"https://github.com/faye/websocket-driver-ruby/commit/7d6fd87759a2fdc83590d3b49ffa661dc53fa128","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"}],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}