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

- Database: RustSec
- Published: 2026-02-04
- Modified: 2026-03-24

## Also published as

- [GHSA-G433-PQ76-6CMF](https://cve.now/GHSA-G433-PQ76-6CMF.md) (GitHub)
- [RUSTSEC-2026-0069](https://cve.now/RUSTSEC-2026-0069.md) (RustSec)
- [RUSTSEC-2026-0070](https://cve.now/RUSTSEC-2026-0070.md) (RustSec)
- [RUSTSEC-2026-0071](https://cve.now/RUSTSEC-2026-0071.md) (RustSec)

## Affected versions

- hpke-rs-rust-crypto (crates.io): fixed in 0.6.0

## Description

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

- https://crates.io/crates/hpke-rs-rust-crypto
- https://rustsec.org/advisories/RUSTSEC-2026-0072.html
- https://github.com/cryspen/hpke-rs/pull/124

Page: https://cve.now/RUSTSEC-2026-0072

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
