Russh: SSH identification parsing accepted non-canonical client banners and did not bound pre-banner input
Date: 2026-06
Affected: rust/russh
Attack vector: other
Category: vulnerability-disclosure
Severity: Medium
CVE: CVE-2026-48108
CWE: CWE-20
CVSS: 5.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L)

### Summary `russh` did not enforce the SSH identification-string rules as deliberately as OpenSSH. In particular, the server-side identification reader used the same permissive path as the client, allowing pre-banner lines from clients, and the reader did not enforce a bounded number of pre-banner lines. For a library server built on `russh`, this could allow a remote peer to hold connection setup resources in the cleartext pre-authentication phase with malformed identification input that should have been rejected early. ### Details RFC 4253 section 4.2 defines the SSH protocol version exchange. The identification string is a single line terminated by CR LF, must fit within 255 characters including CR LF, and clients should not send pre-banner lines before their SSH identification string. Before the fix, `russh`'s identification reader lived in: - `russh/src/ssh_read.rs` - `russh/src/server/mod.rs` The same `read_ssh_id()` behavior was used for both client and server contexts. That allowed server-side parsing to accept preliminary banner lines from clients, even though RFC 4253 only describes server-side pre-identification text. The reader also discarded preliminary lines without a line-count cap, so a peer could repeatedly send short non-SSH lines and keep the connection in identification parsing until an application-level timeout or external resource limit intervened. This also creates a remotely observable parser-state oracle inside a single connection. A client c


Mitigations:

Architectural layers (MAESTRO):