CVE-2025-54804: Russh Russh Is Missing Overflow Checks Vulnerability
MODERATECVE-2025-54804 is a MODERATE (CVSS 6.5) russh is missing overflow checks vulnerability (CWE-190: Integer Overflow or Wraparound) affecting Russh libraries in the crates.io ecosystem. The issue involves russh is missing overflow checks during channel windows adjust. Remediation is available by upgrading affected packages to version 0.54.1.
CVE-2025-54804 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2025-54804
To remediate this vulnerability, upgrade all affected Russh dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade russh to 0.54.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for russh
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-54804, inspect your project dependencies for Russh:
inspect dependencies for russh
Analyze the terminal output to locate any version of Russh in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.54.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. In Russh, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-54804 Affected Russh Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
russh
|
crates.io |
< 0.54.1
|
0.54.1
|
References
Frequently Asked Questions
What is CVE-2025-54804?
Which Russh versions are affected?
What version fixes CVE-2025-54804?
Is russh affected?
What is the CVSS score of CVE-2025-54804?
What CWE is associated with CVE-2025-54804?
How can I check crates.io dependencies for CVE-2025-54804?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h5rc-j5f5-3gcm",
"modified" : "2025-08-05T17:11:17Z",
"published" : "2025-08-04T20:28:36Z",
"aliases" : [ "CVE-2025-54804" ],
"summary" : "russh is missing overflow checks during channel windows adjust",
"details" : "### Summary\nThe 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. \n\n### Details\nAccording https://datatracker.ietf.org/doc/html/rfc4254#section-5.2, The value must not overflow. \nThe incorrect handling is done in server/encrypted.rs and client/encrypted.rs in the handling of CHANNEL_WINDOW_ADJUST. \n\n```\nlet amount = map_err!(u32::decode(&mut r))?;\n...\nchannel.recipient_window_size += amount;\n```\n\nIt could be replaced with something like \n\n```\n if let Some(ref mut channel) = enc.channels.get_mut(&channel_num) {\n // rfc 4254: The window MUST NOT be increased above 2^32 - 1 bytes.\n new_size = channel.recipient_window_size.saturating_add(amount);\n channel.recipient_window_size = new_size;\n }\n...\n```\n\n### PoC\nA customized client code would be required to send a message with a big value like u32_max. Not done yet.\n\n### Impact\nThis 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "russh"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.54.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Eugeny/russh/security/advisories/GHSA-h5rc-j5f5-3gcm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54804"
}, {
"type" : "WEB",
"url" : "https://github.com/Eugeny/russh/commit/0eb5e406780890e21ff71dd25d731b30676478e5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Eugeny/russh"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-190" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-08-04T20:28:36Z",
"nvd_published_at" : "2025-08-05T01:15:42Z"
}
}