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

Crate russh

Dependencies

(36 total, 25 outdated, 2 insecure)

CrateRequiredLatestStatus
 aes^0.80.9.4out of date
 aes-gcm^0.100.11.1out of date
 async-trait^0.10.1.92up to date
 bitflags^2.02.13.2up to date
 byteorder^1.41.5.1up to date
 cbc^0.10.2.1out of date
 chacha20^0.90.10.2out of date
 ctr^0.90.10.1out of date
 curve25519-dalek ⚠️^4.1.35.1.0insecure
 des^0.8.10.9.0out of date
 digest^0.100.11.3out of date
 elliptic-curve^0.130.14.3out of date
 flate2^1.01.1.11up to date
 futures^0.30.3.34up to date
 generic-array^0.141.4.5out of date
 hex-literal^0.41.1.0out of date
 hmac^0.120.13.0out of date
 log^0.40.4.35up to date
 num-bigint^0.40.5.1out of date
 once_cell^1.131.21.4up to date
 openssl^0.100.10.82up to date
 p256^0.130.14.0out of date
 p384^0.130.14.0out of date
 p521^0.130.14.0out of date
 poly1305^0.80.9.1out of date
 rand^0.80.10.4out of date
 rand_core^0.6.40.10.1out of date
 russh-cryptovec ⚠️^0.7.00.62.0insecure
 russh-keys^0.45.00.49.2out of date
 sha1^0.100.11.0out of date
 sha2^0.100.11.3out of date
 ssh-encoding^0.20.3.0out of date
 ssh-key^0.60.6.7up to date
 subtle^2.42.6.1up to date
 thiserror^1.02.0.21out of date
 tokio^1.17.01.54.1up to date

Dev dependencies

(10 total, 6 outdated)

CrateRequiredLatestStatus
 anyhow^1.01.0.105up to date
 clap^3.24.6.10out of date
 env_logger^0.100.11.12out of date
 rand^0.8.50.10.4out of date
 ratatui^0.26.00.30.2out of date
 russh-sftp^2.0.0-beta.24.0.0out of date
 shell-escape^0.10.1.5up to date
 termion^24.0.6out of date
 tokio^1.17.01.54.1up to date
 tokio-fd^0.30.3.0up to date

Security Vulnerabilities

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.

curve25519-dalek: Scalar Multiplication Arithmetic Bug in AVX-512 Backend

RUSTSEC-2026-0620

Summary

Any user using the AVX-512 backend of curve25519-dalek could have produced incorrect outputs on computations involving a scalar multiplication on an attacker-chosen Edwards or Ristretto point. This affects all versions of curve25519-dalek in the range 1.1.0–5.0.0, inclusive. No other backends are affected: serial, fiat, and simd (AVX2) are all fine.

Who Is Affected

Anyone who used curve25519-dalek with the AVX-512 backend. Here is how that would happen, based on crate version:

|Version|How AVX-512 backend is enabled| |-------|----------------------| |5.0.0 | The crate must be compiled with --cfg curve25519_dalek_backend="avx512" or built with target_feature=+avx512ifma,+avx512vl (or -C target-cpu=native on an AVX-512 target) on rustc ≥ 1.89 or nightly. In addition, the CPU it's being run on must have those features (runtime selection) | |4.2.0–5.0.0-rc.1 | The crate must be compiled with --cfg curve25519_dalek_backend="unstable_avx512" on nightly. | |4.0.0–4.1.3 | The crate must be compiled with nightly and the CPU it's being run on must have avx512ifma and avx512vl (i.e., runtime backend selection). | |1.1.0–3.2.1 | The nightly-only simd_backend feature must be set and the build must have target_feature=+avx512ifma |

Impact

On the AVX-512 backend, Edwards or Ristretto computations including scalar multiplication with an attacker-chosen point could be made to be incorrect. No other backends are affected. x-only multiplication used in x25519-dalek is unaffected. ed25519-dalek may be affected, though, in the worst case, a valid signature under an attacker-chosen public key would appear as invalid.

Workaround

The workaround depends on the version you're using:

|Version|Workaround| |-------|----------| |5.0.0 | Do not compile with --cfg curve25519_dalek_backend="avx512" and do not build with target_feature=+avx512ifma,+avx512vl or -C target-cpu=native on an AVX-512 target. You can set --cfg curve25519_dalek_backend="simd" instead. | |4.2.0–5.0.0-rc.1 | Do not set --cfg curve25519_dalek_backend="unstable_avx512". Or compile on stable. | |4.0.0–4.1.3 | Override the backend to --cfg curve25519_dalek_backend="serial", or compile on stable. | |1.1.0–3.2.1 | Do not set the simd_backend feature. Or do not set target_feature=+avx512ifma or -C target-cpu=native on an AVX-512 target in the build. |

More Details

A more complete writeup can be found at https://github.com/dalek-cryptography/curve25519-dalek/issues/934