Rust advisories / ed25519-dalek
Vulnerability MediumRUSTSEC-2022-0093 · ed25519-dalek
RUSTSEC-2022-0093: Double Public Key Signing Function Oracle Attack on `ed25519-dalek`
Short answerA security vulnerability in the ed25519-dalek crate: Double Public Key Signing Function Oracle Attack on `ed25519-dalek`. GitHub rates it Medium. Fixed in 2.0.0: update to a fixed version.
| Crate | ed25519-dalek |
|---|---|
| Type | Vulnerability (crypto-failure) |
| Affected versions | Before 2.0.0. |
| Fixed in | 2.0.0 |
| Severity | Medium (GitHub rating) |
| Published | 2022-06-11 |
| Last changed | 2025-10-28 |
| Also known as | CVE-2022-50237, GHSA-w5vr-6qhr-36cc |
What to do
- See which version you have:
cargo tree -i ed25519-dalek(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p ed25519-dalek. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampleed25519-dalek = "2.0.0") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
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.
References
- Package: crates.io/crates/ed25519-dalek
- Advisory: rustsec.org/advisories/RUSTSEC-2022-0093.html
- Web: github.com/MystenLabs/ed25519-unsafe-libs
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Same crateed25519-dalek: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?