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

CVE-2026-46702: Russh SSH Library DOS Vulnerability

CVE-2026-46702 is a denial-of-service vulnerability in Russh SSH library affecting compression handling. Attackers can send oversized packets to exhaust resources. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-46702 Overview

CVE-2026-46702 affects russh, a Rust SSH client and server library. The vulnerability exists in versions 0.34.0 through 0.61.0 when SSH compression is enabled. The library accepts compressed packets whose on-wire size passes normal transport packet-length checks but whose decompressed size is significantly larger. Remote peers can send oversized post-decompression packets that should have been rejected, leading to denial-of-service through resource exhaustion in the receive path. Older releases prior to 0.58.0 used CryptoVec in the same decompression path, worsening historical impact. The maintainers patched the issue in version 0.61.1.

Critical Impact

Unauthenticated remote attackers can exhaust memory resources on russh-based SSH peers by transmitting small compressed packets that expand to large sizes after decompression.

Affected Products

  • russh versions 0.34.0 through 0.61.0 (when SSH compression is enabled)
  • russh versions prior to 0.58.0 (worse historical impact due to CryptoVec usage)
  • Applications and services built on the russh Rust SSH library

Discovery Timeline

  • 2026-06-10 - CVE-2026-46702 published to NVD
  • 2026-06-10 - Last updated in NVD database

Technical Details for CVE-2026-46702

Vulnerability Analysis

The flaw is an allocation of resources without limits or throttling weakness [CWE-770] in the SSH packet receive path. SSH supports optional compression negotiated during key exchange. russh validates packet length against transport-layer limits before decompression. However, the library does not enforce equivalent bounds on the resulting decompressed payload. An attacker can craft a small compressed packet that expands into a much larger buffer after inflation. The receive path then allocates memory proportional to the decompressed output rather than the wire-size limit. Repeated or sufficiently large expansion ratios drive the process toward memory exhaustion. The condition affects both client and server roles because both sides decompress peer-supplied SSH packets when compression is active.

Root Cause

The receive path applies packet-length checks to the on-wire compressed form but does not apply the same upper bound to the post-decompression output. This omission allows the decompressor to produce buffers larger than the SSH transport layer would normally permit. In releases before 0.58.0, the decompression target was CryptoVec, a buffer type that increases the severity of oversized allocations.

Attack Vector

Exploitation requires network reachability to a russh peer with compression negotiated. No authentication is required because compression can be active after key exchange and before user authentication completes in some configurations. The attacker connects to the target, completes the necessary handshake to enable compression, and then sends crafted compressed SSH packets containing highly compressible content. Each packet inflates to a size far larger than its wire footprint, forcing large allocations on the receiver. Sustained sending causes the target process to consume excessive memory and become unresponsive or terminate.

No verified proof-of-concept code is published. See the GitHub Security Advisory GHSA-wwx6-x28x-8259 for technical details from the maintainers.

Detection Methods for CVE-2026-46702

Indicators of Compromise

  • Sudden memory growth in processes linking russh, particularly during or immediately after SSH session establishment
  • SSH peers terminating with out-of-memory conditions while compression algorithms such as zlib or zlib@openssh.com are negotiated
  • Repeated short-lived SSH connections from a single source followed by service restarts

Detection Strategies

  • Inventory applications that depend on the russh crate and identify versions below 0.61.1 using cargo tree or software bill of materials data
  • Monitor SSH servers for negotiated compression algorithms in session logs and correlate with resource consumption metrics
  • Alert on processes that exceed expected resident set size baselines during SSH handshakes

Monitoring Recommendations

  • Collect per-process memory and CPU telemetry for SSH services and forward it to a central analytics platform for baseline comparison
  • Track inbound SSH connection rates per source address and flag bursts that precede memory pressure events
  • Capture and retain SSH transport logs that record negotiated cipher and compression suites for incident review

How to Mitigate CVE-2026-46702

Immediate Actions Required

  • Upgrade the russh dependency to version 0.61.1 or later in all affected applications and rebuild
  • Disable SSH compression on russh-based clients and servers until the upgrade is deployed
  • Restrict network exposure of russh-based SSH endpoints to trusted source ranges where feasible

Patch Information

The maintainers fixed CVE-2026-46702 in russh 0.61.1. The patch enforces bounds on the post-decompression packet size so that inflated payloads exceeding the SSH transport limit are rejected. Refer to the GitHub Security Advisory GHSA-wwx6-x28x-8259 for the official remediation notice and affected version range.

Workarounds

  • Configure russh-based services to refuse SSH compression algorithms during key exchange negotiation
  • Place rate limits and connection quotas in front of russh listeners using a reverse proxy or firewall
  • Apply per-process memory limits with systemdMemoryMax, cgroups, or container resource constraints to contain exhaustion
bash
# Update the russh dependency to a patched version
cargo update -p russh --precise 0.61.1
cargo build --release

# Example systemd hardening to cap memory for an SSH service
# /etc/systemd/system/my-russh-service.d/limits.conf
[Service]
MemoryMax=512M
TasksMax=256

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.