GHSA-g433-pq76-6cmf
Bug fixes in hpke-rs, hpke-rs-rust-crypto
We publish a GitHub security advisory for any releases whose CHANGELOG includes bug-fixes, and encourage our users to upgrade. The latest releases of the hpke-rs and hpke-rs-rust-crypto crates contain the following bug-fixes:
hpke-rs
- #127: Fix
KemAlgorithm::TryFrom<u16>mapping where0x004Dincorrectly resolved toXWingDraft06instead ofXWingDraft06Obsolete. - #123: Fix potential overflow in context counter and switch to use u64.
- #128: Return errors when trying to use open/seal with export only ciphersuite and when using kdf export with an output that's too long (instead of truncating it)
The issue fixed in #123 was first reported by Nadim Kobeissi. The issues fixed in #127 and #128 were first reported by Scott Arciszewski.
hpke-rs-rust-crypto
- #124: Error out on x25519 0 keys
The issue fixed in #124 was first reported by Nadim Kobeissi.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
What each source reports
GitHub Advisories Score used 8.2
Bug fixes in hpke-rs, hpke-rs-rust-crypto
We publish a GitHub security advisory for any releases whose CHANGELOG includes bug-fixes, and encourage our users to upgrade. The latest releases of the hpke-rs and hpke-rs-rust-crypto crates contain the following bug-fixes:
hpke-rs
- #127: Fix
KemAlgorithm::TryFrom<u16>mapping where0x004Dincorrectly resolved toXWingDraft06instead ofXWingDraft06Obsolete. - #123: Fix potential overflow in context counter and switch to use u64.
- #128: Return errors when trying to use open/seal with export only ciphersuite and when using kdf export with an output that's too long (instead of truncating it)
The issue fixed in #123 was first reported by Nadim Kobeissi. The issues fixed in #127 and #128 were first reported by Scott Arciszewski.
hpke-rs-rust-crypto
- #124: Error out on x25519 0 keys
The issue fixed in #124 was first reported by Nadim Kobeissi.
- Record
GHSA-g433-pq76-6cmf- CVSS 4.0
- 8.2 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-20, CWE-190, CWE-697
- Updated
- 2026-11-02
OSV 8.2
Bug fixes in hpke-rs, hpke-rs-rust-crypto
We publish a GitHub security advisory for any releases whose CHANGELOG includes bug-fixes, and encourage our users to upgrade. The latest releases of the hpke-rs and hpke-rs-rust-crypto crates contain the following bug-fixes:
hpke-rs
- #127: Fix
KemAlgorithm::TryFrom<u16>mapping where0x004Dincorrectly resolved toXWingDraft06instead ofXWingDraft06Obsolete. - #123: Fix potential overflow in context counter and switch to use u64.
- #128: Return errors when trying to use open/seal with export only ciphersuite and when using kdf export with an output that's too long (instead of truncating it)
The issue fixed in #123 was first reported by Nadim Kobeissi. The issues fixed in #127 and #128 were first reported by Scott Arciszewski.
hpke-rs-rust-crypto
- #124: Error out on x25519 0 keys
The issue fixed in #124 was first reported by Nadim Kobeissi.
- Record
GHSA-g433-pq76-6cmf- CVSS 4.0
- 8.2 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-190, CWE-20, CWE-697
- Updated
- 2026-11-02
OSVRUSTSEC-2026-0070 8.2
Panic When Opening or Sealing on Export-Only Context
Constructing an HPKE Context with the AEAD algorithm set to
HpkeExport resulted in a panic when calling Context::seal, or
Context::open. This was due to an underflowing integer subtraction
when calculating the length of a vector allocation for the AEAD nonce,
which would panic on its own in debug mode and cause out-of-memory
abort on the allocation in release mode.
Impact
Applications that could be made to use an HPKE context configured with
HpkeExport as AEAD algorithm to open or seal a ciphertext would
crash. Other applications are unaffected.
Mitigation
Starting with version 0.6.0, an error will be returned when
attempting to call Context::seal or Context::open on an HPKE
context with HpkeExport as AEADAlgorithm.
- Record
RUSTSEC-2026-0070- CVSS 4.0
- 8.2 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N - Updated
- 2026-11-02
OSVRUSTSEC-2026-0071 9.3
Nonce Reuse in HPKE Context
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.
- Record
RUSTSEC-2026-0071- CVSS 4.0
- 9.3 Critical
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 - Updated
- 2026-11-02
OSVRUSTSEC-2026-0069No score
Incorrect Length Encoding on KDF Export
Passing values length > 65535 to Context::export produces output
that disagrees with the RFC 9180 label encoding. In particular the
length value is cast to u16 truncating any value exceeding
65535.
Impact
Applications that use hpke-rs to export very large secrets would experience interoperability issues with other applications that use a correct implementation to export very large secrets.
Mitigation
Starting with version 0.6.0, an error will be returned when
attempting to call Context::export with an output length > 65535.
- Record
RUSTSEC-2026-0069- Updated
- 2026-11-02
OSVRUSTSEC-2026-0072No score
Missing Check for All-Zero X25519 Shared Secret
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.
- Record
RUSTSEC-2026-0072- Updated
- 2026-11-02
Affected packages
| Package | Affected | Fixed |
|---|---|---|
hpke-rscrates.io | before 0.6.0 | 0.6.0 |
hpke-rs-rust-cryptocrates.io | before 0.6.0 | 0.6.0 |
hpke-rscrates.io | 0.0.0-0 up to 0.6.0 | 0.6.0 |
hpke-rs-rust-cryptocrates.io | 0.0.0-0 up to 0.6.0 | 0.6.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | GitHub Advisories, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
GHSA-g433-pq76-6cmf is a high vulnerability (CVSS 8.2) in hpke-rs, published February 4, 2026. No source lists public exploit code. Fixed in hpke-rs 0.6.0.
References
github.com/cryspen/hpke-rs/security/advisories/GHSA-g433-pq76-6cmf
github.com/cryspen/hpke-rs/pull/123
github.com/cryspen/hpke-rs/pull/124
github.com/cryspen/hpke-rs/pull/127
github.com/cryspen/hpke-rs/pull/128
github.com/cryspen/hpke-rs/commit/1c247b5c9aeca602ad2971c9bd49817fe2c308e6
Show 11 moreShow less
github.com/cryspen/hpke-rs/commit/25248bd624cc0325c98a05c169a0c9aa0aced632
github.com/cryspen/hpke-rs/commit/3a8254938f43bdc4e0c9c4f987f8071f19779066
github.com/cryspen/hpke-rs/commit/b54c8bb83906331bdf4f606cafa30cd7fd20b531
rustsec.org/advisories/RUSTSEC-2026-0070.html
rustsec.org/advisories/RUSTSEC-2026-0072.html
github.com/advisories/GHSA-g433-pq76-6cmf
github.com/cryspen/hpke-rs
crates.io/crates/hpke-rs
rustsec.org/advisories/RUSTSEC-2026-0069.html
rustsec.org/advisories/RUSTSEC-2026-0071.html
crates.io/crates/hpke-rs-rust-crypto