RUSTSEC-2026-0071 — Nonce Reuse in hpke-rs — Advisory Details
CRITICAL
Nonce Reuse in HPKE Context
Published February 5, 2026Updated March 24, 2026Source: osv
Summary
The sequence number that is used to compute the AEAD nonce when using
a re-usable HPKE context is incremented after each seal or open
operation. This sequence number was stored as a `u32` and used regular
addition on `u32` for the increment, meaning in release mode it would
silently wrap around to 0 after 2^32 seal or open operations.
## Impact
Nonce reuse causes catastrophic breakage of AEAD ciphers, enabling
plaintext recovery attacks and authentication tag forgeries, depending
on the concrete AEAD.
This bug impacts applications that use hpke-rs to encrypt a large
number of messages using the same context. Applications using the
one-shot APIs are unaffected.
## Mitigation
Starting with version `0.6.0`, `checked_add` is used to increment the
sequence number, which avoids a silent wraparound in release
mode. Additionally, the sequence number is now stored as a `u64`,
increasing the maximally allowed number of seal and open operations on
a given HPKE context.
Advisory Timeline
- First published February 5, 2026 (249 days ago).
- Last revised March 24, 2026 — 47 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
Cargo
Update hpke-rs to 0.6.0 or latercargo update -p hpke-rs --precise 0.6.0
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: crates.io (1).
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| hpke-rs | crates.io | All versions | 0.6.0 |
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
References
Frequently Asked Questions
- What is RUSTSEC-2026-0071?
- Nonce Reuse in HPKE Context This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
- How do I check if my project is affected by RUSTSEC-2026-0071?
- RUSTSEC-2026-0071 affects hpke-rs. Use GeekWala's free vulnerability scanner to check your dependencies against RUSTSEC-2026-0071 and 200,000+ other known vulnerabilities.
Severity & Exploitability
CVSS Score
9.1
Exploitation is straightforward and causes maximum impact. Patch immediately.
Also Known As
GHSA-g433-pq76-6cmf
RUSTSEC-2026-0069
RUSTSEC-2026-0070
RUSTSEC-2026-0072
Related CVEs
- RUSTSEC-2026-0327CRITICAL
Wasmtime component async-lifted callback result count is unvalidated, causing a native stack buffer overflow
- CVE-2026-75856CRITICAL
CodeWhale: SSRF bypass - TOCTOU on DNS failure for DNS pinning
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies