This project contains known security vulnerabilities. Find detailed information at the bottom.

Crate bssh

Dependencies

(56 total, 2 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 bytes^1.11.11.12.1up to date
 tokio^1.52.31.53.1up to date
 clap^4.6.14.6.6up to date
 anyhow^1.0.1021.0.104up to date
 thiserror^2.0.182.0.20up to date
 tracing^0.1.440.1.44up to date
 tracing-subscriber^0.3.230.3.23up to date
 serde^1.0.2281.0.229up to date
 serde_yaml^0.90.9.34+deprecatedup to date
 futures^0.3.320.3.34up to date
 async-trait^0.1.890.1.92up to date
 indicatif^0.18.40.18.6up to date
 rpassword^7.4.07.5.4up to date
 dirs^6.06.0.0up to date
 chrono^0.4.440.4.45up to date
 glob^0.3.30.3.4up to date
 whoami^2.1.12.1.3up to date
 sha1^0.11.00.11.0up to date
 owo-colors^4.3.04.4.0up to date
 unicode-width^0.2.20.2.2up to date
 terminal_size^0.4.40.4.4up to date
 zeroize^1.8.21.9.0up to date
 secrecy^0.10.30.10.3up to date
 rustyline^18.0.018.0.1up to date
 crossterm^0.290.29.0up to date
 ratatui^0.300.30.2up to date
 regex^1.12.31.13.1up to date
 signal-hook^0.40.4.4up to date
 nix^0.310.31.3up to date
 smallvec^1.15.11.16.0up to date
 lru^0.18.00.18.4up to date
 uuid^1.23.11.26.0up to date
 tokio-util^0.7.180.7.19up to date
 socket2^0.60.6.5up to date
 shell-words^1.1.11.1.1up to date
 base64^0.22.10.23.1out of date
 hmac^0.13.00.13.0up to date
 sha2^0.11.00.11.0up to date
 signature^3.0.03.0.0up to date
 hickory-resolver^0.26.10.26.1up to date
 libc^0.20.2.189up to date
 ipnetwork^0.210.21.1up to date
 bcrypt ⚠️^0.190.19.3maybe insecure
 argon2^0.50.6.0out of date
 rand^0.100.10.2up to date
 ssh-key=0.7.0-rc.110.6.7up to date
 async-compression^0.40.4.44up to date
 serde_json^1.01.0.151up to date
 opentelemetry^0.320.32.0up to date
 opentelemetry_sdk^0.320.32.1up to date
 opentelemetry-otlp^0.320.32.0up to date
 url^2.52.5.8up to date
 tokio-rustls^0.260.26.4up to date
 rustls-native-certs^0.80.8.4up to date
 security-framework^3.7.03.7.0up to date
 windows-sys^0.610.61.2up to date

Dev dependencies

(7 total, all up-to-date)

CrateRequiredLatestStatus
 tempfile^3.27.03.27.0up to date
 mockito^1.7.21.7.2up to date
 tokio-test^0.40.4.5up to date
 serial_test^4.0.14.0.1up to date
 insta^1.471.48.0up to date
 criterion^0.80.8.2up to date
 mockall^0.15.00.15.0up to date

Crate bssh-russh

Dependencies

(69 total, 2 outdated, 1 insecure, 2 possibly insecure)

CrateRequiredLatestStatus
 aes^0.90.9.3up to date
 async-trait^0.1.500.1.92up to date
 aws-lc-rs^1.16.21.18.1up to date
 bitflags^2.02.13.1up to date
 block-padding^0.40.4.2up to date
 byteorder^1.41.5.0up to date
 bytes ⚠️^1.71.12.1maybe insecure
 cbc^0.20.2.1up to date
 cipher^0.5.10.5.2up to date
 criterion^0.70.8.2out of date
 crypto-bigint^0.7.30.7.5up to date
 ctr^0.100.10.1up to date
 curve25519-dalek^55.0.0up to date
 data-encoding^2.32.11.1up to date
 delegate^0.130.13.5up to date
 der^0.80.8.1up to date
 des^0.90.9.0up to date
 digest^0.11.00.11.3up to date
 ecdsa^0.170.17.0up to date
 ed25519-dalek^33.0.0up to date
 elliptic-curve^0.140.14.1up to date
 enum_dispatch^0.3.130.3.13up to date
 flate2^1.0.151.1.10up to date
 futures^0.30.3.34up to date
 generic-array^1.3.31.4.5up to date
 getrandom^0.40.4.3up to date
 ghash^0.6.00.6.0up to date
 hex-literal^11.1.0up to date
 hmac^0.130.13.0up to date
 inout^0.20.2.2up to date
 keccak^0.2.00.2.2up to date
 log^0.4.110.4.34up to date
 md5^0.80.8.1up to date
 ml-kem^0.30.3.2up to date
 module-lattice^0.20.2.3up to date
 internal-russh-num-bigint=0.5.00.5.0up to date
 num-bigint^0.4.60.5.1out of date
 p256^0.140.14.0up to date
 p384^0.140.14.0up to date
 p521^0.140.14.0up to date
 pbkdf2^0.130.13.0up to date
 pkcs1=0.8.0-rc.40.7.5up to date
 pkcs5^0.80.8.1up to date
 pkcs8^0.110.11.0up to date
 polyval^0.7.10.7.3up to date
 rand^0.100.10.2up to date
 rand_core^0.10.00.10.1up to date
 ring^0.17.140.17.14up to date
 rsa ⚠️=0.10.0-rc.180.9.10insecure
 russh-cryptovec^0.62.00.62.0up to date
 russh-util^0.52.00.52.0up to date
 salsa20^0.11.00.11.0up to date
 scrypt^0.12.00.12.0up to date
 sec1^0.80.8.1up to date
 sha1^0.110.11.0up to date
 sha2^0.110.11.0up to date
 sha3^0.12.00.12.0up to date
 signature^33.0.0up to date
 spki^0.80.8.0up to date
 ssh-encoding^0.30.3.0up to date
 ssh-key=0.7.0-rc.110.6.7up to date
 subtle^2.42.6.1up to date
 thiserror^2.0.182.0.20up to date
 tokio ⚠️^1.17.01.53.1maybe insecure
 typenum^1.171.20.1up to date
 universal-hash^0.6.10.6.1up to date
 yasna^0.60.6.0up to date
 zeroize^1.71.9.0up to date
 pageant^0.20.2.2up to date

Dev dependencies

(3 total, 1 possibly insecure)

CrateRequiredLatestStatus
 env_logger^0.110.11.11up to date
 tempfile^3.14.03.27.0up to date
 tokio ⚠️^1.17.01.53.1maybe insecure

Crate bssh-russh-sftp

Dependencies

(14 total, all up-to-date)

CrateRequiredLatestStatus
 tokio^1.52.31.53.1up to date
 tokio-util^0.7.180.7.19up to date
 serde^1.0.2281.0.229up to date
 serde_bytes^0.11.190.11.19up to date
 bitflags^2.11.12.13.1up to date
 async-trait^0.1.890.1.92up to date
 futures^0.3.320.3.34up to date
 thiserror^2.0.182.0.20up to date
 chrono^0.4.440.4.45up to date
 bytes^1.11.11.12.1up to date
 log^0.4.290.4.34up to date
 dashmap^6.1.06.2.1up to date
 wasm-bindgen-futures^0.4.710.4.77up to date
 gloo-timers^0.4.00.4.0up 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);

rsa: Marvin Attack: potential key recovery through timing sidechannels

RUSTSEC-2023-0071

Impact

Due to a non-constant-time implementation, information about the private key is leaked through timing information which is observable over the network. An attacker may be able to use that information to recover the key.

Patches

No patch is yet available, however work is underway to migrate to a fully constant-time implementation.

Workarounds

The only currently available workaround is to avoid using the rsa crate in settings where attackers are able to observe timing information, e.g. local use on a non-compromised computer is fine.

References

This vulnerability was discovered as part of the "Marvin Attack", which revealed several implementations of RSA including OpenSSL had not properly mitigated timing sidechannel attacks.

bytes: Integer overflow in `BytesMut::reserve`

RUSTSEC-2026-0007

In the unique reclaim path of BytesMut::reserve, the condition

if v_capacity >= new_cap + offset

uses an unchecked addition. When new_cap + offset overflows usize in release builds, this condition may incorrectly pass, causing self.cap to be set to a value that exceeds the actual allocated capacity. Subsequent APIs such as spare_capacity_mut() then trust this corrupted cap value and may create out-of-bounds slices, leading to UB.

This behavior is observable in release builds (integer overflow wraps), whereas debug builds panic due to overflow checks.

PoC

use bytes::*;

fn main() {
    let mut a = BytesMut::from(&b"hello world"[..]);
    let mut b = a.split_off(5);

    // Ensure b becomes the unique owner of the backing storage
    drop(a);

    // Trigger overflow in new_cap + offset inside reserve
    b.reserve(usize::MAX - 6);

    // This call relies on the corrupted cap and may cause UB & HBO
    b.put_u8(b'h');
}

Workarounds

Users of BytesMut::reserve are only affected if integer overflow checks are configured to wrap. When integer overflow is configured to panic, this issue does not apply.

bcrypt: Panic in `bcrypt::verify` on non-ASCII hash input

RUSTSEC-2026-0199

bcrypt::verify(password, hash) and HashParts::from_str(hash) panic in str::slice_error_fail when given a 60-byte &str containing a multi-byte UTF-8 character at certain byte positions.

Impact

Any Rust code that calls bcrypt::verify (or HashParts::from_str) with an attacker-controlled hash string will panic. The bcrypt crate is #![forbid(unsafe_code)], so this is limited to a denial-of-service and cannot lead to memory corruption.

Realistic attack contexts include:

  • Rust authentication services reading hashes from a database that was previously compromised via, e.g., SQL injection. The attacker can then crash the service on every login attempt against the tampered account.
  • CLI tools accepting hashes from stdin or command-line arguments.
  • Password managers or vault services loading hashes from untrusted configuration sources.

Root cause

split_hash performed five &str slicing operations on the input hash: &hash[1..3], &hash[4..6], &hash[7..], &salt_and_hash[..22], and &salt_and_hash[22..]. None of these were char-boundary-checked. Any input where a multi-byte UTF-8 character spanned one of those byte positions caused a panic.

This is a regression of the fix originally shipped in 2021 for issue #62 (commit 0833509). The regression was introduced in the parser rewrite in PR #95 (commit e9a8394, released as 0.19.0).

The pre-existing regression test does_no_error_on_char_boundary_splitting was not removed, but was silently rendered ineffective by the new bytes[0] != b'$' guard, which rejected its input earlier and prevented it from reaching the buggy slices — leaving CI green through the regression.

Fix

split_hash now rejects any hash string containing non-ASCII bytes up front. A valid bcrypt hash is always exactly 60 ASCII bytes, so this closes the entire class of byte-boundary panics rather than guarding each slice individually.

The fix was merged in PR #103 and released as bcrypt 0.19.2 on 2026-06-20.

Downstream impact

pyca/bcrypt (which depended on bcrypt 0.19.1) is not affected. Its Python-side wrapper performs its own byte-level salt parsing before invoking bcrypt::hash_with_salt, and never reaches the buggy code path in split_hash or verify.