VulnerabilityRUSTSEC-2026-0331 · libcrux-kem
RUSTSEC-2026-0331: Panic on Decoding Short Hybrid Keys
Short answerA security vulnerability in the libcrux-kem crate: Panic on Decoding Short Hybrid Keys. No severity score was published. Fixed in 0.0.10: update to a fixed version.
| Crate | libcrux-kem |
|---|---|
| Type | Vulnerability |
| Affected versions | Before 0.0.10. |
| Fixed in | 0.0.10 |
| Severity | not scored CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| Published | 2026-08-24 |
| Last changed | 2026-10-07 |
| Also known as | none |
| Affected functions | libcrux_kem::PrivateKey::decode, libcrux_kem::PublicKey::decode |
What to do
- See which version you have:
cargo tree -i libcrux-kem(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p libcrux-kem. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplelibcrux-kem = "0.0.10") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
The deserialization functions X25519MlKem768Draft00PrivateKey::decode X25519MlKem768Draft00PublicKey::decode and XWingKemDraft06PublicKey::decode would panic during an indexing operation when provided an input slice that is shorter than the length of the given key type, i.e. shorter than 2400 bytes in the case of the X25519MlKem768Draft00 private key and shorter than 1184 bytes in the case of the X25519MlKem768Draft and XWingKemDraft06 public keys.
Impact
Applications decoding attacker provided slices into the above mentioned private and public key types could be made to panic.
Mitigation
With release of version 0.0.10 of libcrux-kem this bug has been fixed and the serialization functions return InvalidPrivateKey and InvalidPublicKey errors on invalid input buffer lengths.
We recommend users upgrade to libcrux-kem version 0.0.10.
References
- Package: crates.io/crates/libcrux-kem
- Advisory: rustsec.org/advisories/RUSTSEC-2026-0331.html
- Web: github.com/celabshq/libcrux/pull/1560
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for libcrux-kem
Up next
Same cratelibcrux-kem: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?