Skip to main content
Vulnerability Database/CVE-2026-102823

CVE-2026-102823: Russh Library Privilege Escalation Vulnerability

CVE-2026-102823 is a privilege escalation vulnerability in the Russh SSH library that allows malicious servers to send lifecycle events for invalid channel identifiers. This post covers technical details, affected versions, impact, and mitigation strategies.

Published:

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-102823 Overview

CVE-2026-102823 is an input validation vulnerability [CWE-20] in Russh, a Rust SSH client and server library maintained by Eugeny. Versions prior to 0.63.1 fail to verify that channel identifiers in inbound SSH messages belong to channels the client actually opened and established. The affected function client_read_authenticated in russh/src/client/encrypted.rs forwards CHANNEL_DATA, CHANNEL_EXTENDED_DATA, CHANNEL_EOF, CHANNEL_CLOSE, CHANNEL_OPEN_FAILURE, CHANNEL_SUCCESS, CHANNEL_FAILURE, and specific CHANNEL_REQUEST subtypes directly to public client::Handler callbacks. A malicious SSH server can leverage this to trigger application panics or corrupt exit-code tracking.

Critical Impact

A malicious SSH server can send lifecycle events for unopened or released channel IDs, causing client panics or corruption of command completion state.

Affected Products

  • Russh SSH library versions prior to 0.63.1
  • Rust applications embedding the vulnerable russh client crate
  • Downstream tools relying on client::Handler callbacks for command execution and exit status tracking

Discovery Timeline

  • 2026-09-29 - CVE-2026-102823 published to the National Vulnerability Database (NVD)
  • 2026-09-29 - Last updated in NVD database
  • Patch released - Fixed in russh version 0.63.1 per GitHub Release v0.63.1

Technical Details for CVE-2026-102823

Vulnerability Analysis

The vulnerability stems from missing state validation in the client-side SSH message dispatcher. When Russh receives channel-scoped messages, it looks up the recipient channel identifier and invokes application-level Handler callbacks without confirming the channel was opened and confirmed by the server. This includes core lifecycle events and the CHANNEL_REQUEST subtypes exit-status, exit-signal, and xon-xoff.

A hostile SSH server can predict or fabricate channel identifiers and inject events into the client's execution flow. This causes two primary failure modes: application panics via unwrap or similar assertions on missing channel state, and corruption of command completion and exit-code tracking when spoofed exit-status events overwrite legitimate results.

Root Cause

The encrypted channel table maintained by Russh is authoritative for SSH protocol state, but the pre-patch code did not consult it before dispatching channel-scoped callbacks. The self.channels map could hold local stream handles for opens still awaiting peer confirmation, so simply checking that map was insufficient. Without a helper such as is_established_channel, the library trusted arbitrary channel IDs supplied by the server.

Attack Vector

Exploitation requires the victim client to connect to a malicious or compromised SSH server. No user interaction beyond the connection is required, and no client credentials are needed by the attacker. Once connected, the server sends crafted channel messages referencing unopened or released channel IDs, driving the client into panic or corrupting exit-code semantics that upstream logic depends on.

rust
// Security patch in russh/src/session.rs - correctly handle unexpected channel IDs

/// Channel-scoped messages (`CHANNEL_DATA`, `CHANNEL_EOF`, `CHANNEL_CLOSE`,
/// `CHANNEL_REQUEST`, ...) operate on an already-open channel. An
/// authenticated peer must not be able to drive channel callbacks
/// (`data`, `exit_status`, `channel_close`, ...) for a recipient id that
/// was never opened or whose local open is still waiting for peer
/// confirmation. The encrypted channel table is authoritative for the SSH
/// protocol state.
pub(crate) fn is_established_channel(&self, channel: ChannelId) -> bool {
    self.encrypted
        .as_ref()
        .and_then(|enc| enc.channels.get(&channel))
        .is_some_and(|channel| channel.confirmed)
}

Source: GitHub Commit 3430fd26. The patch introduces is_established_channel, which the dispatcher consults before invoking Handler callbacks.

Detection Methods for CVE-2026-102823

Indicators of Compromise

  • Unexpected process termination or panic messages from applications embedding russh versions below 0.63.1.
  • Inconsistent or incorrect exit codes reported for remote commands executed via russh clients.
  • SSH sessions to untrusted or newly introduced servers followed by abrupt client crashes.

Detection Strategies

  • Inventory Rust binaries and container images for dependency on russh at versions less than 0.63.1 using cargo tree or SBOM tooling.
  • Review application logs for panic stack traces originating from russh/src/client/encrypted.rs or channel-handling code paths.
  • Correlate SSH client crash events with outbound connections to unmanaged or attacker-controlled SSH endpoints.

Monitoring Recommendations

  • Alert on repeated russh client crashes or restart loops in orchestrated workloads and CI runners.
  • Monitor outbound SSH connections from services that use russh and flag connections to unapproved destinations.
  • Track dependency drift so builds pulling russh are pinned to 0.63.1 or later and audited during release.

How to Mitigate CVE-2026-102823

Immediate Actions Required

  • Upgrade all applications and libraries depending on russh to version 0.63.1 or later.
  • Audit dependency graphs for transitive use of russh and rebuild affected artifacts.
  • Restrict russh client connections to trusted, authenticated SSH servers pending patch rollout.

Patch Information

The fix is available in Russh release v0.63.1. Full technical context is provided in GitHub Security Advisory GHSA-47hw-gvq5-r2gm and the remediation commit 3430fd26. The patch introduces is_established_channel and gates channel-scoped callbacks on confirmed channels.

Workarounds

  • Limit russh-based clients to connecting only to verified server endpoints under organizational control.
  • Wrap Handler callbacks with defensive checks that ignore events for channel IDs the application does not track.
  • Isolate SSH client processes so panics do not affect parent services or persistent state.
bash
# Update the russh dependency in Cargo.toml, then rebuild
cargo update -p russh --precise 0.63.1
cargo tree -i russh   # verify no transitive versions below 0.63.1 remain
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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.