Loading...
Skip to main content

CVE-2025-54804

MEDIUM

russh is missing overflow checks during channel windows adjust

Published August 4, 2025Updated August 5, 2025Source: osv

Summary

### Summary The channel window adjust message of the SSH protocol is used to track the free space in the receive buffer of the other side of a channel. The current implementation takes the value from the message and adds it to an internal state value. This can result in a integer overflow. If the Rust code is compiled with overflow checks, it will panic. A malicious client can crash a server. ### Details According https://datatracker.ietf.org/doc/html/rfc4254#section-5.2, The value must not overflow. The incorrect handling is done in server/encrypted.rs and client/encrypted.rs in the handling of CHANNEL_WINDOW_ADJUST. ``` let amount = map_err!(u32::decode(&mut r))?; ... channel.recipient_window_size += amount; ``` It could be replaced with something like ``` if let Some(ref mut channel) = enc.channels.get_mut(&channel_num) { // rfc 4254: The window MUST NOT be increased above 2^32 - 1 bytes. new_size = channel.recipient_window_size.saturating_add(amount); channel.recipient_window_size = new_size; } ... ``` ### PoC A customized client code would be required to send a message with a big value like u32_max. Not done yet. ### Impact This problem seems only critical to a server. One user can crash the server, which might take down the service. A malicious server could also crash a single client, but this seems not very critical.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update russh to 0.54.1 or later
cargo update -p russh --precise 0.54.1

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

PackageEcosystemAffectedFixed In
russh
crates.io
All versions0.54.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.

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

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

Frequently Asked Questions

What is CVE-2025-54804?
russh is missing overflow checks during channel windows adjust This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.5/10).
How do I check if my project is affected by CVE-2025-54804?
CVE-2025-54804 affects russh. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-54804 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.5

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-h5rc-j5f5-3gcm

Related CVEs

  • CVE-2026-48110
    HIGH

    Russh SSH message fields were decoded through allocation-first parsers before field-specific bounds

  • CVE-2026-42189
    HIGH

    russh has pre-auth DoS via unbounded allocation in its keyboard-interactive auth handler

  • CVE-2026-46673
    HIGH

    Russh: Unchecked CryptoVec allocation and growth handling is reachable

  • CVE-2024-43410
    HIGH

    Russh has an OOM Denial of Service due to allocation of untrusted amount

  • CVE-2026-46702
    HIGH

    russh: Post-decompression SSH packet size was not bounded, allowing remote oversized compressed packets

  • CVE-2026-61807
    MEDIUM

    Snipe-IT: Stored DOM XSS via table selected-count IDs

  • CVE-2026-48107
    MEDIUM

    Russh: Unchecked keyboard-interactive prompt count in client auth path

  • CVE-2026-68930
    MEDIUM

    Russh: Channel-scoped server callbacks can be reached without an open channel

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies