All vulnerabilities

crates.io

CVE-2026-116774

russh: peer-declared zero maximum packet size permanently stalls channel writes (silent AsyncWrite hang)

Severity
Medium 4.3
Published
30 Oct 2026
Last changed
30 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
0.65
Exploit chance
0.3% in the next 30 daysHigher than 17% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Uncontrolled resource consumption (CWE-400)Infinite loop (CWE-835)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
Also known as
GHSA-fw5c-8223-6h42
Sources
OSV.dev and GitHub

Description

A peer can advertise maximum packet size = 0 in its channel-open message (CHANNEL_OPEN when attacking a server, CHANNEL_OPEN_CONFIRMATION when attacking a client). russh accepts the value without validation and copies it into the channel write state, where it caps the size of every outgoing data chunk. In the AsyncWrite code path (ChannelTx::poll_writable, used by Channel::data(), Channel::make_writer() and Channel::into_stream()), a cap of 0 makes every write future stay Poll::Pending forever: writable = max_packet_size.min(window_size).min(buf_len) is always 0, and no future event can ever raise it (a static maximum packet size of 0 can never be satisfied by any amount of peer-granted window). The write neither completes nor errors, so the application task hangs silently.

Every other write path in russh already treats max_packet_size == 0 as an error (Error::Inconsistent): Channel::reserve_writable_chunk (russh/src/channels/mod.rs:363-365) and the session packetizers…

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
russhcrates.io · osv:crates.io:russh
  • From 0.60.0 before 0.65

About russh

Downloads in the last 90 days (crates.io)
5,135,797crates.io, 23 Nov 2026
Total downloads (crates.io)
11,304,063crates.io, 23 Nov 2026

References