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 osshkeys

Dependencies

(21 total, 3 outdated, 2 possibly insecure)

CrateRequiredLatestStatus
 base64^0.21.00.22.1out of date
 byteorder^1.4.31.5.0up to date
 openssl ⚠️^0.10.300.10.71maybe insecure
 rand^0.8.50.9.0out of date
 ed25519-dalek ⚠️^2.0.0-rc.22.1.1maybe insecure
 zeroize^1.1.01.8.1up to date
 log^0.4.80.4.26up to date
 backtrace^0.3.460.3.74up to date
 pem^2.0.13.0.5out of date
 regex^1.8.31.11.1up to date
 digest^0.10.20.10.7up to date
 md-5^0.10.00.10.6up to date
 sha-1^0.10.00.10.1up to date
 sha2^0.10.10.10.8up to date
 bcrypt-pbkdf^0.10.00.10.0up to date
 cryptovec^0.6.10.6.1up to date
 cipher^0.4.00.4.4up to date
 cbc^0.1.00.1.2up to date
 ctr^0.9.00.9.2up to date
 aes^0.8.00.8.4up to date
 des^0.8.00.8.1up to date

Dev dependencies

(3 total, 1 outdated)

CrateRequiredLatestStatus
 hex^0.4.00.4.3up to date
 hex-literal^0.4.11.0.0out of date
 cfg-if^1.0.01.0.0up to date

Security Vulnerabilities

ed25519-dalek: Double Public Key Signing Function Oracle Attack on `ed25519-dalek`

RUSTSEC-2022-0093

Versions of ed25519-dalek prior to v2.0 model private and public keys as separate types which can be assembled into a Keypair, and also provide APIs for serializing and deserializing 64-byte private/public keypairs.

Such APIs and serializations are inherently unsafe as the public key is one of the inputs used in the deterministic computation of the S part of the signature, but not in the R value. An adversary could somehow use the signing function as an oracle that allows arbitrary public keys as input can obtain two signatures for the same message sharing the same R and only differ on the S part.

Unfortunately, when this happens, one can easily extract the private key.

Revised public APIs in v2.0 of ed25519-dalek do NOT allow a decoupled private/public keypair as signing input, except as part of specially labeled "hazmat" APIs which are clearly labeled as being dangerous if misused.

openssl: ssl::select_next_proto use after free

RUSTSEC-2025-0004

In openssl versions before 0.10.70, ssl::select_next_proto can return a slice pointing into the server argument's buffer but with a lifetime bound to the client argument. In situations where the server buffer's lifetime is shorter than the client buffer's, this can cause a use after free. This could cause the server to crash or to return arbitrary memory contents to the client.

openssl 0.10.70 fixes the signature of ssl::select_next_proto to properly constrain the output buffer's lifetime to that of both input buffers.

In standard usage of ssl::select_next_proto in the callback passed to SslContextBuilder::set_alpn_select_callback, code is only affected if the server buffer is constructed within the callback. For example:

Not vulnerable - the server buffer has a 'static lifetime:

builder.set_alpn_select_callback(|_, client_protos| {
    ssl::select_next_proto(b"\x02h2", client_protos).ok_or_else(AlpnError::NOACK)
});

Not vulnerable - the server buffer outlives the handshake:

let server_protos = b"\x02h2".to_vec();
builder.set_alpn_select_callback(|_, client_protos| {
    ssl::select_next_proto(&server_protos, client_protos).ok_or_else(AlpnError::NOACK)
});

Vulnerable - the server buffer is freed when the callback returns:

builder.set_alpn_select_callback(|_, client_protos| {
    let server_protos = b"\x02h2".to_vec();
    ssl::select_next_proto(&server_protos, client_protos).ok_or_else(AlpnError::NOACK)
});