Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-102822 Overview
CVE-2026-102822 is a denial-of-service vulnerability in Russh, a Rust SSH client and server library maintained by Eugeny. Versions prior to 0.63.1 contain a flaw in the MAC (Message Authentication Code) negotiation logic that allows a remote peer to crash the connection task. When a Russh instance is configured to permit mac=none, the selection logic in negotiation.rs only validates needs_mac() when MAC selection fails. This lets a peer pair a MAC-requiring CTR or CBC block cipher with mac=none, then send a packet with a decrypted length of zero that triggers a panic in russh/src/cipher/mod.rs. The issue is fixed in version 0.63.1.
Critical Impact
A remote unauthenticated peer can panic the Russh connection task, terminating the SSH session and causing denial of service on affected clients or servers.
Affected Products
- Russh SSH library versions prior to 0.63.1
- Rust applications embedding Russh as an SSH client or server
- Deployments that permit mac=none in negotiation preferences
Discovery Timeline
- 2026-09-29 - CVE-2026-102822 published to NVD
- 2026-09-29 - Last updated in NVD database
Technical Details for CVE-2026-102822
Vulnerability Analysis
The vulnerability is an improper validation of array index issue [CWE-129] in Russh's SSH transport layer. Russh negotiates ciphers and MACs independently during the SSH handshake. When both peers accept mac=none in their algorithm list, the current selection routine returns mac::NONE without checking whether the negotiated cipher requires an integrity MAC. Pairing a CTR or CBC block cipher with mac=none produces a tag_len() of zero, which breaks assumptions in the packet read path.
On the read path, russh/src/cipher/mod.rs reads an initial block to probe the packet length. If the decrypted packet_length is smaller than the block already read, the code shrinks buffer.len below the probe length. A subsequent slice operation on buffer.buffer[16..] then panics, terminating the connection task and producing a denial-of-service condition.
Root Cause
The root cause is in Self::select for MAC negotiation. The need_mac check was applied only in the Err branch when no common MAC could be found, not when both sides successfully agreed on none. As a result, the negotiation succeeded with a MAC that produced zero-length authentication tags for ciphers that structurally require them.
Attack Vector
The attack requires a network-reachable Russh endpoint that includes none in its MAC preference list. A remote peer completes key exchange, negotiates a CTR or CBC cipher with mac=none, and then sends a crafted SSH packet whose decrypted length field is zero (or otherwise smaller than the probe block). Authentication is not required, but attack complexity is high because the target must be configured to permit mac=none.
// Patch in russh/src/cipher/mod.rs — reject undersized packet lengths
return Err(Error::PacketSize(len));
}
+ // A valid packet_length can never be shorter than the block we
+ // already read to probe it; a smaller value would shrink the
+ // buffer below `l` below and panic on the `buffer.buffer[l..]`
+ // slice. Reject it as a protocol error instead.
+ if len + PACKET_LENGTH_LEN < cipher.packet_length_to_read_for_block_length() {
+ return Err(Error::PacketSize(len));
+ }
+
buffer.len = len + cipher.tag_len();
trace!("reading, clear len = {:?}", buffer.len);
}
// Source: https://github.com/Eugeny/russh/commit/2885385abfee279092a41d80c6cb6ac367353159
Detection Methods for CVE-2026-102822
Indicators of Compromise
- Russh connection tasks terminating with panic messages referencing buffer.buffer slice indexing in cipher/mod.rs.
- SSH sessions that negotiate a CTR or CBC cipher paired with mac=none in handshake logs.
- Repeated abrupt SSH disconnects from the same remote peer without protocol-level error responses.
Detection Strategies
- Inventory Rust projects and container images for russh crate versions below 0.63.1 using cargo audit or SBOM scanning.
- Review Russh server and client configurations for the presence of none in the MAC preference list.
- Instrument application logs to capture panic backtraces from SSH worker tasks and forward them to central logging.
Monitoring Recommendations
- Alert on unexpected process or task crashes in services that embed Russh.
- Track SSH negotiation telemetry for sessions completing with hmac-none alongside aes*-ctr or aes*-cbc.
- Correlate connection resets with source IP reputation to identify probing activity against SSH endpoints.
How to Mitigate CVE-2026-102822
Immediate Actions Required
- Upgrade the russh dependency to version 0.63.1 or later and rebuild affected binaries.
- Remove none from the MAC preference list in Russh client and server configurations.
- Restart services embedding Russh to ensure patched code paths are loaded.
Patch Information
The fix is released in Russh 0.63.1. The patch updates negotiation.rs so MAC selection refuses none whenever the negotiated cipher requires an integrity MAC, and adds a defensive length check in cipher/mod.rs that rejects packet lengths smaller than the probe block as a protocol error. See the GitHub Security Advisory GHSA-p8qx-h547-fjw9, the v0.63.1 release notes, and the upstream commit.
Workarounds
- Configure Russh preferences to exclude mac=none entirely until the upgrade is deployed.
- Restrict SSH exposure using firewall rules or a bastion host to limit which peers can initiate a handshake.
- Wrap Russh connection tasks in supervisors that log panics and rate-limit reconnect attempts from offending peers.
# Update Cargo.toml to require the patched version
cargo update -p russh --precise 0.63.1
cargo build --release
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

