Eugeny russh
cpe:2.3:a:russh_project:russh:*:*:*:*:rust:*:*
- <= 0.58.0
A denial-of-service vulnerability has been identified in the Russh library, which is a Rust SSH client and server library. This issue, present in versions through 0.58.0, arises in the server's keyboard-interactive authentication handler. A malicious client can exploit this vulnerability by sending a single malformed packet, without needing any credentials, to crash any Russh-based server that supports keyboard-interactive authentication, such as for two-factor authentication or TOTP. The vulnerability causes the server to allocate excessive memory, leading to an out-of-memory condition and a process crash.
Exploitation of this vulnerability causes the server process to crash, terminating all active sessions. The crash occurs due to an out-of-memory condition triggered by unbounded memory allocation in response to a crafted authentication packet.
To reproduce this vulnerability, deploy a Russh-based server version 0.58.0 or prior that has keyboard-interactive authentication enabled. This can be done by using the default authentication handler, which returns 'Auth::Partial' and prompts the client for input. Once the server is running, connect to it using a client that can send SSH packets. After the initial key exchange, send a 'USERAUTH_REQUEST' packet requesting keyboard-interactive authentication. The server will respond with a prompt. At this point, send a 'USERAUTH_INFO_RESPONSE' packet with a crafted payload that includes a large value for the response count. The server will attempt to allocate memory based on this value, leading to a crash when the allocation exceeds available resources.
Users can upgrade to Russh version 0.60.1 or later, where this vulnerability has been patched.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.