/

CVE-2026-48110

Severity:

HIGH RISK

(7.5)

Input Validation (CWE-20) in Russh SSH Message Handling

CVE-2026-48110

Deferred

Vulnerability type

Category:

Input Validation

CWE:

CWE-20

Impact:

Denial of Service and Resource Exhaustion

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's SSH client and server handlers validated attacker-controlled strings and length-prefixed fields only after allocating memory and splitting data.

A remote SSH peer can send oversized or malformed fields to trigger excessive allocations or allocation attempts, potentially impacting service stability and resource usage when processing hostile traffic.

Affected context

This vulnerability appears in applications embedding the Russh SSH client or server library between versions 0.34.0 and 0.60.x.

It primarily affects message handling paths that decode SSH strings, name-lists, and byte fields originating from a remote peer.

The issue is most relevant when Russh endpoints are exposed to untrusted or partially trusted SSH connections, including internet-facing services or multi-tenant environments where peers can send arbitrary SSH protocol messages.

Exploit preconditions

  • Attack surface: SSH protocol messages handled by Russh-based clients and servers.
  • Required access: Ability to establish or partially establish an SSH session as a remote peer (typically unauthenticated or pre-auth, depending on how the library is integrated).
  • Trigger point: Decoding of SSH strings, name-lists, and byte sequences where the length is taken from attacker-controlled fields.
  • Why exploitation is possible: The code allocates buffers and splits data based on untrusted length values before enforcing strict size or format checks, allowing oversized or malformed inputs to consume resources prior to rejection.

Why this happens

The root cause is late and insufficient input validation of length-prefixed protocol fields, corresponding to CWE-20: Improper Input Validation.

Russh's message handlers trusted attacker-supplied length values to drive owned memory allocations and buffer splitting logic before confirming that those lengths were reasonable or compliant with the protocol.

This pattern allows untrusted data to influence resource usage and execution flow in ways that should have been constrained by early bounds checking, rather than allocating and then discarding invalid data.

Potential impact

  • Remote peers may cause significant memory usage or allocation pressure on the Russh-based service.
  • An attacker could trigger denial of service by exhausting memory or causing the process to terminate under resource constraints.
  • Degraded performance or increased latency when processing maliciously crafted SSH traffic.
  • Increased risk of cascading failures in resource-constrained or multi-tenant environments sharing the same host.

General mitigation guidance

Effective mitigation centers on early, strict validation of untrusted length and format fields before any allocations or data transformations occur.

Recommended defensive patterns include:

  • Enforcing conservative maximum sizes for SSH strings, name-lists, and byte arrays at message boundaries.
  • Validating protocol-specific constraints (e.g., fan-out, count of list elements) prior to allocating or splitting buffers.
  • Applying global and per-connection resource limits, such as caps on memory, number of active sessions, and concurrent in-flight messages.
  • Designing parsing routines to operate in a streaming or bounded fashion, avoiding large monolithic allocations for attacker-controlled lengths.
  • Running Russh-based services with process-level limits (ulimits, container resource quotas) so that unexpected resource spikes are contained.

How teams detect issues like this

Detection typically involves a combination of code-level and operational techniques:

  • Static analysis or manual code review focused on patterns where attacker-controlled length fields directly influence allocation sizes.
  • Security review of protocol parsers to ensure that bounds checks precede allocations and complex transformations.
  • Fuzz testing of SSH message parsing paths with random and oversized length-prefixed fields to uncover similar behavior.
  • Runtime monitoring and alerting on unusual memory growth, allocation failures, or spikes in error rates for SSH connections.
  • Use of automated code-scanning tools configured with rules for improper input validation and unbounded allocations in networking code.

Sources

SourceLink
github.comgithub.com/Eugeny/russh/security/advisories/GHSA-4r3c-5hpg-58qr

Frequently asked

questions

Yes. A remote SSH peer that can send protocol messages to a Russh-based client or server can exploit the issue by crafting oversized or malformed fields, without necessarily needing to complete authentication.

The attacker generally needs network-level access to the Russh endpoint and the ability to initiate SSH traffic. In many deployments this corresponds to any remote user who can connect to the exposed SSH port.

The safest pattern is to validate all attacker-controlled length and format fields before performing allocations or complex operations. This includes enforcing strict size caps, rejecting obviously unreasonable lengths early, and ensuring protocol constraints are checked before data is copied or split.

Future prevention relies on designing parsers with a "validate-then-use" discipline: treat all remote inputs as untrusted, apply early bounds checks, fuzz critical protocol code, and enforce resource limits at both the library and deployment levels. Incorporating security-focused code review and automated static analysis into the development lifecycle also helps catch such patterns before release.

Find out what's already
exploitable in your codebase.