# RUSTSEC-2026-0331: Panic on Decoding Short Hybrid Keys

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-08-24T12:00:00.000Z
- Modified: 2026-10-07T08:30:02.870Z

## Description

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`.

(As written by RustSec Advisory Database.)

## Affected

- libcrux-kem (crates.io): from 0.0.0-0 before 0.0.10

## References

- <https://crates.io/crates/libcrux-kem> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0331.html> (advisory)
- <https://github.com/celabshq/libcrux/pull/1560> (web)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0331](https://rustsec.org/advisories/RUSTSEC-2026-0331.html), CC0-1.0, modified 2026-10-07

---

Page: https://cve.day/RUSTSEC-2026-0331 · Whole record: https://cve.day/RUSTSEC-2026-0331.json · Rebuilt by cve.day 2026-11-25T22:56:43.423Z
