This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.

Crate russh-keys

Dependencies

(32 total, 22 outdated, 3 possibly insecure)

CrateRequiredLatestStatus
 aes^0.80.9.3out of date
 async-trait^0.1.720.1.92up to date
 bcrypt-pbkdf^0.100.11.0out of date
 bit-vec^0.60.10.1out of date
 block-padding^0.30.4.2out of date
 byteorder^1.41.5.0up to date
 cbc^0.10.2.1out of date
 ctr^0.90.10.1out of date
 data-encoding^2.32.11.1up to date
 dirs^5.07.0.0out of date
 ed25519-dalek^2.03.0.0out of date
 futures^0.30.3.34up to date
 hmac^0.120.13.0out of date
 inout^0.10.2.2out of date
 log^0.40.4.34up to date
 md5^0.70.8.1out of date
 num-bigint^0.40.5.1out of date
 num-integer^0.10.1.47up to date
 openssl ⚠️^0.100.10.81maybe insecure
 p256^0.130.14.0out of date
 p521^0.130.14.0out of date
 pbkdf2^0.110.13.0out of date
 rand^0.70.10.2out of date
 rand_core^0.6.40.10.1out of date
 russh-cryptovec ⚠️^0.7.00.62.0out of date
 serde^1.01.0.229up to date
 sha1^0.100.11.0out of date
 sha2^0.100.11.0out of date
 thiserror^1.02.0.20out of date
 tokio ⚠️^1.17.01.53.1maybe insecure
 tokio-stream^0.10.1.19up to date
 yasna^0.5.00.6.0out of date

Dev dependencies

(2 total, 1 outdated)

CrateRequiredLatestStatus
 env_logger^0.100.11.11out of date
 tempdir^0.30.3.7up to date

Security Vulnerabilities

tokio: reject_remote_clients Configuration corruption

RUSTSEC-2023-0001

On Windows, configuring a named pipe server with pipe_mode will force ServerOptions::reject_remote_clients as false.

This drops any intended explicit configuration for the reject_remote_clients that may have been set as true previously.

The default setting of reject_remote_clients is normally true meaning the default is also overridden as false.

Workarounds

Ensure that pipe_mode is set first after initializing a ServerOptions. For example:

let mut opts = ServerOptions::new();
opts.pipe_mode(PipeMode::Message);
opts.reject_remote_clients(true);

openssl: Use-After-Free in `Md::fetch` and `Cipher::fetch`

RUSTSEC-2025-0022

When a Some(...) value was passed to the properties argument of either of these functions, a use-after-free would result.

In practice this would nearly always result in OpenSSL treating the properties as an empty string (due to CString::drop's behavior).

The maintainers thank quitbug for reporting this vulnerability to us.

russh-cryptovec: Unchecked `CryptoVec` allocation and growth handling

RUSTSEC-2026-0153

CryptoVec used unchecked capacity growth, unchecked length arithmetic, and unsafe allocation and locking paths. In affected russh releases, attacker-controlled input could reach these code paths through buffer resizing operations.

Two affected reachability paths were identified:

  • Current russh releases (0.60.x before the fix) Local SSH agent peers could provide attacker-controlled frame lengths that were used to resize internal buffers before validation in:

    • AgentClient::read_response
    • agent::server::Connection::run
  • Historical russh releases before 0.58.0 CryptoVec was also used for non-secret transport and compression buffers, allowing remote SSH traffic to trigger CryptoVec growth through:

    • transport packet reads
    • zlib decompression output

These remote paths were removed in 0.58.0 when CryptoVec stopped being used for those buffers.

Under constrained memory conditions, historical russh versions prior to 0.58.0 can abort the process when remote compressed payload expansion causes allocation failure in CryptoVec. This was reproduced through the compression path and resulted in process termination in the Unix allocation/locking implementation after null pointer allocation failure.

For current affected releases, oversized local SSH agent frame lengths could trigger untrusted-input-driven buffer growth prior to validation.

No practical remote code execution, integrity or confidentiality impact has been demonstrated.

Fixed by validating CryptoVec growth operations and rejecting oversized SSH agent frame lengths before buffer allocation.