/

CVE-2026-102823

Severity:

HIGH RISK

(7.5)

Improper Input Validation (CWE-20) in Russh SSH Client

CVE-2026-102823

Deferred

Vulnerability type

Category:

Improper Input Validation

CWE:

CWE-20

Impact:

Application Denial of Service and Command-State Corruption

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Russh improperly accepts SSH channel lifecycle events for identifiers that the client did not open, establish, or still own. A malicious SSH server may trigger application panics or corrupt command completion and exit-code tracking when these events reach public client callbacks.

Affected context

The issue occurs in Russh client handling after authentication, when inbound channel data, lifecycle events, or selected request subtypes are forwarded to application callbacks without verifying channel ownership and state. It is relevant when an application connects to an untrusted or compromised SSH server and relies on callback state for command completion, exit status, or channel lifecycle management.

Exploit preconditions

  • Attack surface: SSH client protocol message handling
  • Required access: The attacker must operate or control an SSH server that the client connects to, or otherwise be able to send authenticated server-side protocol messages
  • Trigger point: Receipt of channel data, channel lifecycle events, or exit-status, exit-signal, and xon-xoff requests
  • Why exploitation is possible: Incoming messages are forwarded to public callbacks without confirming that the referenced channel identifier belongs to an opened and established client channel

Why this happens

The underlying bug is insufficient validation of protocol state and resource ownership. Russh processes channel-related messages based on a supplied ChannelId without first confirming that the identifier represents a valid, client-created, currently established channel. This maps to CWE-20 because externally supplied protocol values are accepted without enforcing the expected range, lifecycle, and ownership constraints, allowing invalid state transitions to reach application logic.

Potential impact

  • A malicious server may cause a client application to panic
  • Command completion handling may become inconsistent or incorrect
  • Exit codes or signal state may be corrupted
  • Applications may lose reliable tracking of channel lifecycle events
  • Repeated malformed events could cause denial of service

General mitigation guidance

Mitigation generally focuses on validating channel ownership and lifecycle

state before dispatching protocol events to application callbacks.

Common defensive patterns include:

  • Accepting channel events only for identifiers associated with established client channels
  • Rejecting or safely ignoring messages for unopened, unconfirmed, or released channels
  • Making callback dispatch resilient to invalid state transitions
  • Treating remote protocol fields as untrusted and validating them at the parsing boundary
  • Avoiding panics for malformed or unexpected peer input
  • Limiting client privileges and isolating SSH sessions according to least-privilege principles
  • Using maintained library revisions that contain the relevant validation behavior

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis and code review checks for callback dispatch based solely on remote identifiers
  • Tests that send channel events for unknown, predicted, duplicate, closed, and released identifiers
  • State-machine testing of SSH channel creation, confirmation, closure, and event ordering
  • Fuzzing protocol handlers with invalid channel identifiers and unexpected lifecycle sequences
  • Runtime monitoring for repeated panics, callback failures, or inconsistent command exit-state records
  • Dependency and policy checks that flag outdated cryptographic or protocol libraries

Sources

SourceLink
github.comgithub.com/Eugeny/russh/commit/3430fd26ecafc0dc3705210f5f39a9119fa22774
github.comgithub.com/Eugeny/russh/releases/tag/v0.63.1
github.comgithub.com/Eugeny/russh/security/advisories/GHSA-47hw-gvq5-r2gm

Frequently asked

questions

Yes, in deployments where the client connects to a malicious or compromised SSH

server. The server can send crafted channel events through the SSH protocol

after the relevant session is established.

No direct local access is generally required. The key requirement is the ability

to act as the SSH server the client trusts or connects to.

Validate every channel identifier against the client's tracked channel state

and ownership before invoking application callbacks. Invalid or out-of-state

events should be rejected or handled without panicking.

Use protocol state-machine tests, fuzz malformed channel events, enforce

defensive callback boundaries, and apply dependency governance for security

fixes in networking libraries.

Find out what's already
exploitable in your codebase.