{"id":"RUSTSEC-2026-0072","summary":"Missing Check for All-Zero X25519 Shared Secret","details":"Computing an X25519 shared secret with\n`x25519_dalek::StaticSecret::diffie_hellman` does not include the\ncheck that the key exchange was contributory, i.e. does not ensure on\nits own that the resulting shared secret is non-zero.\n\n## Impact\nRFC 9180 mandates that implementations of HPKE must check for all zero\nDiffie-Hellman shared secrets and abort if so.\n\nApplications using hpke-rs with the RustCryto provider would not\nperform this check allowing for non-contributive Diffie-Hellman shared\nsecrets. Applications using hpke-rs with the libcrux provider are not\naffected.\n\n## Mitigation\nStarting with version `0.6.0`, an error will be returned when\nthe computed Diffie-Hellman shared secret is all-zero.","aliases":["GHSA-g433-pq76-6cmf","RUSTSEC-2026-0069","RUSTSEC-2026-0070","RUSTSEC-2026-0071"],"modified":"2026-03-24T08:41:23.142103Z","published":"2026-02-04T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/hpke-rs-rust-crypto"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0072.html"},{"type":"WEB","url":"https://github.com/cryspen/hpke-rs/pull/124"}],"affected":[{"package":{"name":"hpke-rs-rust-crypto","ecosystem":"crates.io","purl":"pkg:cargo/hpke-rs-rust-crypto"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.6.0"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"arch":[],"functions":["hpke_rs_rust_crypto::HpkeRustCrypto::dh"],"os":[]}},"database_specific":{"categories":[],"cvss":null,"informational":null,"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0072.json"}}],"schema_version":"1.7.5"}