{"id":"CVE-2025-54804","aliases":["CVE-2025-54804","GHSA-h5rc-j5f5-3gcm"],"related":[],"kind":"vulnerability","state":"published","title":"Russh is missing an overflow check during channel windows adjust","summary":"Russh is a Rust SSH client & server library. In versions 0.54.0 and below, 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. This is fixed in version 0.54.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Russh is a Rust SSH client & server library. In versions 0.54.0 and below, 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. This is fixed in version 0.54.1.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Russh es una librería de cliente y servidor SSH de Rust. En las versiones 0.54.0 y anteriores, el mensaje de ajuste de la ventana de canal del protocolo SSH se utiliza para rastrear el espacio libre en el búfer de recepción del otro lado de un canal. La implementación actual toma el valor del mensaje y lo añade a un valor de estado interno. Esto puede provocar un desbordamiento de enteros. Si el código de Rust se compila con comprobaciones de desbordamiento, se generará un pánico. Un cliente malicioso puede colapsar un servidor. Esto se solucionó en la versión 0.54.1.","source":"nvd"}],"published":"2025-08-04T20:28:36.000Z","modified":"2026-09-10T03:50:27.096Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-190"],"affected":[{"ranges":[{"version":"< 0.54.1","status":"affected"}],"vendor":"Eugeny","product":"russh","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.54.1"}],"ecosystem":"crates.io","package":"russh","purl":"pkg:cargo/russh","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.54.1"}],"vendor":"russh_project","product":"russh","cpe":"cpe:2.3:a:russh_project:russh:*:*:*:*:*:rust:*:*","source":"nvd"},{"ranges":[{"status":"affected","fixed":"0.16.0"}],"vendor":"warpgate_project","product":"warpgate","cpe":"cpe:2.3:a:warpgate_project:warpgate:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/Eugeny/russh/security/advisories/GHSA-h5rc-j5f5-3gcm","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/Eugeny/russh/commit/0eb5e406780890e21ff71dd25d731b30676478e5","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-54804","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Eugeny/russh","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-08-05T14:44:02.759Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-54804","url":"https://www.cve.org/CVERecord?id=CVE-2025-54804","licence":"CVE Terms of Use","modified":"2025-08-05T14:44:05.415Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h5rc-j5f5-3gcm","url":"https://github.com/advisories/GHSA-h5rc-j5f5-3gcm","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:27.096Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-54804","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-54804","licence":"Public domain","modified":"2026-06-17T09:40:44.133Z"}],"updatedAt":"2026-11-25T22:59:02.043Z","epss":{"score":0.0045,"percentile":0.40817,"date":"2026-12-01T12:00:22.000Z"}}