Russh Keyboard-Interactive Authentication Denial-of-Service Vulnerability

Vulnerability

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.

Impact

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.

Reproduction

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.

Remediation

Users can upgrade to Russh version 0.60.1 or later, where this vulnerability has been patched.

Added: May 8, 2026, 10:05 PM
Updated: May 8, 2026, 10:05 PM

Vulnerability Rating

Custom Algorithm
spread
0.8
impact
2.5
exploitability
9.5
remediation
7.7
relevance
7.8
threat
6.4
urgency
2.9
incentive
8.3

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.