rustsec-2026-0072
Vulnerability from osv_rustsec
Published
2026-02-04 12:00
Modified
2026-03-24 08:16
Summary
Missing Check for All-Zero X25519 Shared Secret
Details
Computing an X25519 shared secret with
x25519_dalek::StaticSecret::diffie_hellman does not include the
check that the key exchange was contributory, i.e. does not ensure on
its own that the resulting shared secret is non-zero.
Impact
RFC 9180 mandates that implementations of HPKE must check for all zero Diffie-Hellman shared secrets and abort if so.
Applications using hpke-rs with the RustCryto provider would not perform this check allowing for non-contributive Diffie-Hellman shared secrets. Applications using hpke-rs with the libcrux provider are not affected.
Mitigation
Starting with version 0.6.0, an error will be returned when
the computed Diffie-Hellman shared secret is all-zero.
References
{
"affected": [
{
"database_specific": {
"categories": [],
"cvss": null,
"informational": null
},
"ecosystem_specific": {
"affected_functions": null,
"affects": {
"arch": [],
"functions": [
"hpke_rs_rust_crypto::HpkeRustCrypto::dh"
],
"os": []
}
},
"package": {
"ecosystem": "crates.io",
"name": "hpke-rs-rust-crypto",
"purl": "pkg:cargo/hpke-rs-rust-crypto"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0-0"
},
{
"fixed": "0.6.0"
}
],
"type": "SEMVER"
}
],
"versions": []
}
],
"aliases": [
"GHSA-g433-pq76-6cmf"
],
"database_specific": {
"license": "CC0-1.0"
},
"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.",
"id": "RUSTSEC-2026-0072",
"modified": "2026-03-24T08:16:07Z",
"published": "2026-02-04T12:00:00Z",
"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"
}
],
"related": [],
"severity": [],
"summary": "Missing Check for All-Zero X25519 Shared Secret"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…