{"id":"GHSA-h5rc-j5f5-3gcm","revision":"808f880d3dc54dd3a4c4aee94083f0cc","records":[{"revision":"808f880d3dc54dd3a4c4aee94083f0cc","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-h5rc-j5f5-3gcm","aliases":["CVE-2025-54804"],"title":"russh is missing overflow checks during channel windows adjust","description":"### 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.","state":0,"publishedAt":"2025-08-04T20:28:36+00:00","modifiedAt":"2026-09-10T03:50:27.0966474+00:00","affected":[{"ecosystem":"crates.io","name":"russh","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.54.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/Eugeny/russh/security/advisories/GHSA-h5rc-j5f5-3gcm","https://nvd.nist.gov/vuln/detail/CVE-2025-54804","https://github.com/Eugeny/russh/commit/0eb5e406780890e21ff71dd25d731b30676478e5","https://github.com/Eugeny/russh"],"sourceUrl":"https://github.com/advisories/GHSA-h5rc-j5f5-3gcm","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-h5rc-j5f5-3gcm","identifiers":["GHSA-h5rc-j5f5-3gcm","CVE-2025-54804"]},"retained":false,"historicalAffected":[]}],"coverage":[]}