Advisory

RUSTSEC-2026-0331

Also known as: None

Summary

Panic on Decoding Short Hybrid Keys

Details

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.

Severity

Not rated by the source.

Dates

Published
2026-08-24 12:00 UTC
Modified
2026-10-07 08:30 UTC

Affected packages and fixes

libcrux-kem

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.0.10 (semver)

Fixed versions

0.0.10

Fix

  • Fixed version 0.0.10
    cargo update -p libcrux-kem --precise 0.0.10

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences