Email me

Rust advisories / hpke-rs-rust-crypto

Vulnerability HighRUSTSEC-2026-0072 · hpke-rs-rust-crypto

RUSTSEC-2026-0072: Missing Check for All-Zero X25519 Shared Secret

Short answerA security vulnerability in the hpke-rs-rust-crypto crate: Missing Check for All-Zero X25519 Shared Secret. GitHub rates it High. Fixed in 0.6.0: update to a fixed version.

Cratehpke-rs-rust-crypto
TypeVulnerability
Affected versionsBefore 0.6.0.
Fixed in0.6.0
SeverityHigh (GitHub rating)
Published2026-02-04
Last changed2026-03-24
Also known asGHSA-g433-pq76-6cmf, RUSTSEC-2026-0069, RUSTSEC-2026-0070, RUSTSEC-2026-0071
Affected functionshpke_rs_rust_crypto::HpkeRustCrypto::dh

What to do

  1. See which version you have: cargo tree -i hpke-rs-rust-crypto (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p hpke-rs-rust-crypto. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example hpke-rs-rust-crypto = "0.6.0") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

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

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

Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ