websocket-driver-ruby: Denial of service via malformed Host header
High severity
GitHub Reviewed
Published
Jun 23, 2026
in
faye/websocket-driver-ruby
•
Updated Jul 21, 2026
Description
Published to the GitHub Advisory Database
Jul 21, 2026
Reviewed
Jul 21, 2026
Last updated
Jul 21, 2026
Impact
If 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 aHostheader that is not a validhost[:port]string. When this happens, aURI::InvalidURIErrorexception is raised which is not caught, and this can cause the server process to crash if the application does not catch the error from theparse()method itself.Patches
The issue has been patched in version 0.8.2 by making the request parser catch
URI::InvalidURIErrorand enter an error state if theHostheader is malformed. This means the request is considered invalid and should not establish a WebSocket connection.Workarounds
No known workarounds exist.
Acknowledgements
This issue was discovered and reported by Pranjali Thakur, DepthFirst Security Research Team.
References