Skip to main content

russh CVE-2026-46702

| EUVDEUVD-2026-36125 HIGH
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-05-29 https://github.com/Eugeny/russh GHSA-wwx6-x28x-8259
7.5
CVSS 3.1 · Vendor: https://github.com/Eugeny/russh
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Connect to russh SSH server
  2. Delivery
    Advertise zlib in KEXINIT preference
  3. Exploit
    Complete key exchange and NEWKEYS
  4. Install
    Send compressed SSH_MSG_DEBUG under 256 KiB
  5. C2
    Server inflates payload beyond 128 MiB
  6. Execute
    Repeat across connections
  7. Impact
    Memory exhaustion and DoS

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the russh server has SSH compression negotiated for the session - this is not the default outcome between two russh peers (default preference puts 'none' first) but is reachable in practice because the default server still advertises zlib and zlib@openssh.com, and server-side negotiation follows the client's preference order, so any attacker-controlled client that prefers zlib will succeed. No authentication is required (PR:N): the strongest attack path is a malicious client sending an SSH_MSG_DEBUG packet after NEWKEYS but before SSH_MSG_USERAUTH_REQUEST. No user interaction is needed (UI:N). The limiting factors are: the target must be a russh server (not OpenSSH or another implementation), must be on a version in the range >= 0.34.0 and < 0.61.1, and must not have had its advertised compression algorithm list manually pruned to remove zlib variants. Historical versions 0.34.0-0.57.x have a worse impact profile due to CryptoVec-backed decompression buffers and constrained-memory abort behavior.

Impact

The CVSS 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) score accurately reflects an unauthenticated remote availability impact, and the cited preconditions are realistic: russh servers advertise zlib and zlib@openssh.com by default, and server-side negotiation follows the client's preference order, so an attacker-controlled client can force compression even though the server prefers 'none'. EPSS and KEV data were not provided in the input, so widespread exploitation cannot be confirmed - this is consistent with a recently disclosed library vulnerability without observed in-the-wild abuse. No public exploit identified at time of analysis, though the advisory itself contains a functional PoC and in-tree regression tests demonstrating the attack pre-authentication, which lowers the practical barrier to weaponization. Real-world priority is high for any internet-exposed russh server (SFTP daemons, custom bastions, CI runners) but lower for client-only deployments, since the strongest pre-auth case is server-side; embedded or memory-constrained deployments running 0.34.0-0.57.x face the worse historical CryptoVec abort behavior.

Exploit ScenarioDerived

An attacker connects to an internet-exposed russh server (for example, a Rust-based SFTP service or custom bastion), sends SSH_MSG_KEXINIT advertising 'zlib,zlib@openssh.com,none' as their client-to-server compression preference, and completes key exchange and NEWKEYS. Before sending any SSH_MSG_USERAUTH_REQUEST, the attacker emits a single crafted SSH_MSG_DEBUG packet whose compressed body is under 256 KiB but decompresses to over 128 MiB; repeating this across parallel connections drives the server toward memory exhaustion and process termination. A working PoC is included in the upstream advisory and as in-tree regression tests, so weaponization requires only adapting the test harness into a standalone client.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 29, 2026

Remote denial-of-service in russh, a Rust implementation of the SSH protocol, allows unauthenticated remote attackers to exhaust server memory by sending small compressed SSH packets that inflate to massive sizes post-decompression. Affecting all versions from 0.34.0 through 0.61.0, the flaw stems from missing post-decompression size enforcement in Decompress::decompress(), allowing payloads under the 256 KiB wire cap to expand beyond 128 MiB. No public exploit identified at time of analysis, but the advisory includes a detailed PoC demonstrating pre-authentication exploitation against default server configurations.

RemediationAI

Vendor-released patch: upgrade russh to 0.61.1 or later via cargo update -p russh, which enforces an explicit 128 MiB ceiling inside Decompress::decompress() matching OpenSSH portable's effective sshbuf maximum. The fix preserves normal compressed packet behavior below the cap, including DEBUG packets that are decompressed and then ignored. If immediate patching is not possible, the most effective workaround is to remove zlib and zlib@openssh.com from the server's advertised compression algorithm list so that only 'none' is negotiated - this fully eliminates the attack surface but loses bandwidth savings on slow links and breaks interoperability with clients that strictly require compression. Network-level mitigations such as restricting SSH access by source IP, fronting russh servers with an OpenSSH reverse proxy (which enforces its own SSHBUF_SIZE_MAX bound), or capping per-connection memory via cgroups can reduce blast radius but do not prevent the underlying acceptance of oversized decompressed packets. Full advisory and patch details at https://github.com/Eugeny/russh/security/advisories/GHSA-wwx6-x28x-8259.

Affected VersionsENISA

russh 0.34.0, < 0.61.1

Affected Packages

cargo russh fix: 0.61.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in cargo

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

russh is a Rust SSH client and server library maintained by Eugeny (CPE pkg:rust/russh). The vulnerability is a textbook CWE-770 (Allocation of Resources Without Limits or Throttling) in the SSH transport layer's compression handling. RFC 4253 section 6.2 specifies that compression is applied only to the SSH payload field, with packet_length and MAC computed over the compressed bytes - meaning the wire-level packet length check is necessary but insufficient. russh's Decompress::decompress() grew its output buffer via repeated doubling without a post-decompression ceiling, while OpenSSH portable indirectly bounds decompressed output through sshbuf's SSHBUF_SIZE_MAX (128 MiB). Historical versions (>= 0.34.0, < 0.58.0) routed decompression through CryptoVec, making the impact more severe under constrained memory; releases >= 0.58.0 switched to Vec<u8> but retained the unbounded growth issue.

Know when SSH gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/Eugeny/russh) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Primary rating from Vendor (https://github.com/Eugeny/russh) · only source for this CVE.

CVSS VectorVendor: https://github.com/Eugeny/russh

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

Summary

When SSH compression is enabled, russh accepted compressed packets whose on-wire size passed the normal transport packet-length checks but whose decompressed size was much larger. This allowed a remote peer to send oversized post-decompression packets that should have been rejected.

In current releases, this is a remote denial-of-service / resource-exhaustion issue in the post-decompression receive path.

In older releases before 0.58.0, the same remote decompression path used CryptoVec, which appears to make the historical impact worse.

Details

The normal SSH transport read path enforces a packet-length limit before the packet body is read:

  • russh/src/cipher/mod.rs

However, RFC 4253 compression is applied to the SSH payload field only. The packet_length field and MAC are computed over the compressed payload, so a packet that is reasonably sized on the wire can still expand to a much larger message body after decompression.

In russh, compressed packet bodies are later decompressed in:

  • russh/src/compression.rs
  • russh/src/client/mod.rs
  • russh/src/server/session.rs

Before the fix, Decompress::decompress() grew its output buffer by repeated doubling and did not enforce a separate post-decompression ceiling. That meant a peer could send a small compressed packet that passed the normal on-wire transport length checks and then inflate it into a much larger packet after decompression.

It was verified that an attacker-crafted compressed payload can stay below the normal 256 KiB implementation transport packet cap while still inflating above the intended post-decompression bound. In other words, this is not only a "large on-wire packet" issue.

Version detail:

  • The underlying post-decompression bounds bug appears to affect russh as far back as 0.34.0.
  • In historical releases >= 0.34.0, < 0.58.0, the remote decompression path still used CryptoVec. Remote compressed SSH traffic could drive that path, and under constrained memory that historical code path could abort the process.
  • In current-style releases >= 0.58.0, non-secret packet/decompression buffers were moved off CryptoVec and onto Vec<u8>, but the post-decompression size still remained unbounded. So the bug class remained reachable remotely, but the maintained-line impact is a current remote DoS / oversized-packet-acceptance issue rather than the older CryptoVec-based abort story.
  • The maintained-line fix was verified against 0.60.2.

Compression is not selected in a default-vs-default russh session because the default preference order puts none first. However, the default server configuration still advertises zlib and zlib@openssh.com, and server-side negotiation follows the client's preference order for common algorithms. A client that prefers compression can therefore negotiate it with a default russh server.

OpenSSH portable was checked at /home/mjc/projects/openssh-portable commit 45b30e0a5. OpenSSH enforces a 256 KiB transport packet cap before decompression, but it does not reuse that cap after decompression. Instead, decompression writes to an sshbuf, which is indirectly bounded by OpenSSH's SSHBUF_SIZE_MAX hard maximum of 0x8000000 bytes (128 MiB).

The patch direction should follow that model: add an explicit post-decompression ceiling of 128 MiB, rather than assuming the compressed transport packet cap also bounds decompressed payload size.

Relevant OpenSSH reference points:

  • /home/mjc/projects/openssh-portable/packet.c: PACKET_MAX_SIZE (256 * 1024)
  • /home/mjc/projects/openssh-portable/packet.c: uncompress_buffer() inflates into compression_buffer
  • /home/mjc/projects/openssh-portable/sshbuf.h: SSHBUF_SIZE_MAX 0x8000000

RFC / OpenSSH Comparison

RFC 4253 section 6 defines the binary packet format:

  • packet_length
  • padding_length
  • payload
  • random padding
  • MAC

RFC 4253 section 6.2 says that, when compression is negotiated, the payload field is compressed, and that packet_length and MAC are computed from the compressed payload. The RFC also says implementations should check that packet length is reasonable to avoid denial-of-service and buffer-overflow attacks.

That means the pre-decompression transport packet length check is necessary but not sufficient. A correct implementation still needs a reasonable bound on the decompressed payload that becomes parser input.

OpenSSH provides such a bound indirectly through sshbuf's hard maximum. The russh fix should make the corresponding post-decompression bound explicit.

PoC

There were two kinds of proof:

  • a wire-cap sanity test showing an attacker-crafted best-compressed DEBUG payload can stay below the normal SSH transport packet cap while still inflating beyond the intended post-decompression bound
  • direct client and server receive-path tests that exercise the oversized post-decompression behavior itself

The current in-tree regression tests are:

  • tests::compress::oversized_debug_payload_can_stay_below_wire_cap
  • compression::tests::oversized_decompressed_packet_is_rejected
  • client::tests::compressed_debug_is_ignored_after_client_parses_it
  • client::tests::oversized_compressed_debug_is_rejected_before_client_ignores_it
  • server::session::tests::compressed_debug_is_ignored_after_server_parses_it
  • server::session::tests::oversized_compressed_debug_is_rejected_before_server_ignores_it

The important behavior is:

  1. An attacker-crafted best-compressed DEBUG payload can stay below the normal 256 KiB transport packet cap while still inflating beyond 128 MiB.
  2. In the direct client and server receive paths, small compressed DEBUG packets are still ignored normally after parsing.
  3. In the direct client and server receive paths, oversized compressed DEBUG packets are rejected before the implementation reaches the normal "ignore DEBUG" behavior.

The strongest PoC for severity is the unauthenticated server-side case. A malicious client can choose zlib in the initial key exchange, because the default server advertises it and server-side negotiation follows the client's preference order for common algorithms. After NEWKEYS, but before authentication, the client can send a transport-layer SSH_MSG_DEBUG packet whose compressed body is below the transport packet cap but whose decompressed body exceeds the post-decompression cap.

That demonstrates the AV:N/AC:L/PR:N/UI:N case directly: the attacker is a remote SSH client and does not need a successfully authenticated session.

rust
fn compressed_debug_payload(payload_len: usize) -> Vec<u8> {
    let mut payload = vec![b'A'; payload_len];
    payload[0] = crate::msg::DEBUG;

    let mut encoder =
        flate2::write::ZlibEncoder::new(Vec::new(), flate2::Compression::best());
    encoder.write_all(&payload).unwrap();
    let compressed = encoder.finish().unwrap();

    assert!(
        compressed.len() < 256 * 1024,
        "oversized post-decompression payload still fits under the wire cap"
    );
    compressed
}

fn incoming_packet(compressed: Vec<u8>) -> SSHBuffer {
    let mut buffer = SSHBuffer::new();
    // maybe_decompress() receives the clear SSHBuffer after packet framing,
    // and decompresses bytes after packet_length + padding_length.
    buffer.buffer.extend_from_slice(&[0; 5]);
    buffer.buffer.extend_from_slice(&compressed);
    buffer
}

#[test]
fn unauthenticated_client_zlib_debug_is_rejected_by_server_before_auth() {
    let mut server = preauth_server_session_after_newkeys_with_zlib_decompressor();
    let oversized = MAXIMUM_DECOMPRESSED_PACKET_LEN + 1024;
    let buffer = incoming_packet(compressed_debug_payload(oversized));

    let err = server.maybe_decompress(&buffer).unwrap_err();
    assert!(
        matches!(err, crate::Error::PacketSize(len) if len > MAXIMUM_DECOMPRESSED_PACKET_LEN)
    );
}

The equivalent wire-level attack shape is:

text
1. Connect to a russh server using the default compression advertisement.
2. Send SSH_MSG_KEXINIT with compression client-to-server preference:
   zlib,zlib@openssh.com,none
3. Complete key exchange and send SSH_MSG_NEWKEYS.
4. Before any SSH_MSG_USERAUTH_REQUEST, send a compressed SSH_MSG_DEBUG packet:
   - compressed packet body: < 256 KiB
   - decompressed packet body: > 128 MiB
5. Vulnerable behavior: russh accepts and inflates the packet, then reaches the
   normal DEBUG ignore path.
6. Fixed behavior: russh rejects during decompression with Error::PacketSize.

The direct receive-path client/server regression tests are still useful because they isolate the bug precisely. They construct the post-decryption compressed packet body passed to maybe_decompress() and prove that the oversized packet is rejected before normal DEBUG ignore handling. The server-side pre-auth variant above is the one that justifies the highest CVSS framing for this bug.

The most important targeted checks are:

bash
cargo test -p russh oversized_debug_payload_can_stay_below_wire_cap -- --nocapture
cargo test -p russh oversized_compressed_debug_is_rejected_before_client_ignores_it -- --nocapture
cargo test -p russh oversized_compressed_debug_is_rejected_before_server_ignores_it -- --nocapture

Before the fix, both the direct client and direct server receive-path oversized checks went red because the compressed payload was accepted and decompressed instead of being rejected at the post-decompression boundary. After the fix, they pass.

Impact

Suggested CVSS v3.1 for current maintained releases:

  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Score: 7.5

Reasoning:

  • AV:N: reachable by a remote SSH peer
  • AC:L: straightforward once compression is enabled
  • PR:N, UI:N: no prior auth or user interaction required
  • C:N, I:N: confidentiality or integrity impact was not demonstrated
  • A:H: remote peer can cause oversized post-decompression packet processing and disconnect / denial of service

Affected versions:

  • historical stronger case: russh >= 0.34.0, < 0.58.0
  • current maintained remote DoS case: russh >= 0.58.0, including 0.60.3

Fix / Patch Direction

Add an explicit maximum decompressed SSH packet size and enforce it inside Decompress::decompress() before returning decompressed bytes to the client or server packet parser.

The intended ceiling is 128 MiB, matching OpenSSH portable's effective sshbuf hard maximum for post-decompression packet storage. The fix should reject decompression output larger than that bound with a packet-size error before normal message dispatch.

The fix should preserve normal compressed packet behavior below the cap, including DEBUG packets that are decompressed and then ignored through the existing normal path.

Patch branch:

text
fix/zlib-decompression-cap

Executive ViewAI

Why It Matters

russh, a Rust-based SSH protocol library (versions 0.34.0-0.61.0), contains an unauthenticated remote denial-of-service vulnerability that allows attackers to exhaust server memory and disable SSH services. Publicly available exploit code exists; organizations using this library must immediately implement compensating controls, as no vendor patch is currently available.

Business Impact: High
Compensating Controls

Implement SSH connection rate limiting (5 new connections/minute per source IP) and per-source concurrent connection limits (100 maximum); disable SSH compression to eliminate attack vector; deploy network intrusion detection rules for oversized decompressed payloads; restrict SSH access to designated management networks; enable verbose SSH logging with real-time alerts for exploitation indicators; isolate affected services behind bastion hosts with additional authentication controls.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in SSH

View all
CVE-2014-6271 CRITICAL POC
9.8 Sep 24

GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which

CVE-2014-6278 HIGH POC
8.8 Sep 30

GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, whi

CVE-2014-7169 CRITICAL POC
9.8 Sep 25

GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of

CVE-2012-6066 CRITICAL POC
9.3 Dec 04

freeSSHd.exe in freeSSHd through 1.2.6 allows remote attackers to bypass authentication via a crafted session, as demons

CVE-2014-6277 CRITICAL POC
10.0 Sep 27

GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, whi

CVE-2026-123158 HIGH POC
8.1 Nov 05

Password authentication bypass in OpenSSH sshd before 10.6p2 built against musl libc without PAM lets a remote, unauthen

CVE-2023-38408 CRITICAL POC
9.8 Jul 20

The PKCS#11 feature in ssh-agent in OpenSSH before 9.3p2 has an insufficiently trustworthy search path, leading to remot

CVE-2023-25136 MEDIUM POC
6.5 Feb 03

OpenSSH server (sshd) 9.1 introduced a double-free vulnerability during options.kex_algorithms handling. Rated medium se

CVE-2016-6210 MEDIUM POC
5.9 Feb 13

sshd in OpenSSH before 7.3, when SHA256 or SHA512 are used for user password hashing, uses BLOWFISH hashing on a static

CVE-2015-5600 HIGH POC
8.1 Aug 03

The kbdint_next_device function in auth2-chall.c in sshd in OpenSSH through 6.9 does not properly restrict the processin

CVE-2016-6515 HIGH POC
7.5 Aug 07

The auth_password function in auth-passwd.c in sshd in OpenSSH before 7.3 does not limit password lengths for password a

CVE-2024-6387 HIGH POC
8.1 Jul 01

Remote code execution in OpenSSH's sshd server (regression of CVE-2006-5051) allows unauthenticated remote attackers to

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy