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

Crate solana-sdk

Dependencies

(46 total, 25 outdated, 2 insecure)

CrateRequiredLatestStatus
 assert_matches^1.5.01.5.0up to date
 base64^0.21.70.23.1out of date
 bincode^1.3.33.0.0out of date
 bitflags^2.4.22.13.2up to date
 borsh^1.2.11.8.1up to date
 bs58^0.4.00.5.1out of date
 bytemuck^1.14.01.25.2up to date
 byteorder^1.5.01.5.1up to date
 chrono^0.4.310.4.45up to date
 curve25519-dalek ⚠️^3.2.15.1.0insecure
 derivation-path^0.2.00.2.0up to date
 digest^0.10.70.11.3out of date
 ed25519-dalek ⚠️=1.0.13.0.0insecure
 ed25519-dalek-bip32^0.2.00.3.0out of date
 generic-array^0.14.71.4.5out of date
 hmac^0.12.10.13.0out of date
 itertools^0.10.50.15.0out of date
 js-sys^0.3.670.3.107up to date
 lazy_static^1.4.01.5.1up to date
 libsecp256k1^0.6.00.7.2out of date
 log^0.4.200.4.35up to date
 memmap2^0.5.100.9.12out of date
 num-derive^0.40.5.1out of date
 num-traits^0.20.2.19up to date
 num_enum^0.7.20.7.6up to date
 pbkdf2^0.11.00.13.0out of date
 qstring^0.7.20.7.2up to date
 qualifier_attr^0.2.20.2.2up to date
 rand^0.70.10.4out of date
 rustversion^1.0.141.0.23up to date
 serde^1.0.1951.0.229up to date
 serde_bytes^0.11.140.11.19up to date
 serde_derive^1.0.1031.0.229up to date
 serde_json^1.0.1111.0.154up to date
 serde_with^2.3.33.25.0out of date
 sha2^0.10.80.11.3out of date
 sha3^0.10.40.12.0out of date
 siphasher^0.3.111.0.4out of date
 solana-frozen-abi=1.18.113.9.1out of date
 solana-frozen-abi-macro=1.18.113.7.0out of date
 solana-logger=1.18.113.0.0out of date
 solana-program=1.18.116.0.0out of date
 solana-sdk-macro=1.18.113.0.1out of date
 thiserror^1.0.562.0.21out of date
 uriparse^0.6.40.6.4up to date
 wasm-bindgen^0.20.2.130up to date

Dev dependencies

(5 total, 2 outdated, 1 insecure)

CrateRequiredLatestStatus
 anyhow^1.0.791.0.105up to date
 curve25519-dalek ⚠️^3.2.15.1.0insecure
 hex^0.4.30.4.3up to date
 static_assertions^1.1.01.1.0up to date
 tiny-bip39^0.8.22.0.0out of 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.

curve25519-dalek: Timing variability in `curve25519-dalek`'s `Scalar29::sub`/`Scalar52::sub`

RUSTSEC-2024-0344

Timing variability of any kind is problematic when working with potentially secret values such as elliptic curve scalars, and such issues can potentially leak private keys and other secrets. Such a problem was recently discovered in curve25519-dalek.

The Scalar29::sub (32-bit) and Scalar52::sub (64-bit) functions contained usage of a mask value inside a loop where LLVM saw an opportunity to insert a branch instruction (jns on x86) to conditionally bypass this code section when the mask value is set to zero as can be seen in godbolt:

A similar problem was recently discovered in the Kyber reference implementation:

https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/hqbtIGFKIpU/m/cnE3pbueBgAJ

As discussed on that thread, one portable solution, which is also used in this PR, is to introduce a volatile read as an optimization barrier, which prevents the compiler from optimizing it away.

The fix can be validated in godbolt here:

The problem was discovered and the solution independently verified by Alexander Wagner [email protected] and Lea Themint [email protected] using their DATA tool:

https://github.com/Fraunhofer-AISEC/DATA

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