{"id":"RUSTSEC-2026-0331","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.\n\n# Impact\n\nApplications decoding attacker provided slices into the above mentioned private and public key types could be made to panic.\n\n# Mitigation\n\nWith 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.\n\nWe recommend users upgrade to `libcrux-kem` version `0.0.10`.","modified":"2026-10-07T08:30:02.870588917Z","published":"2026-08-24T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/libcrux-kem"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0331.html"},{"type":"WEB","url":"https://github.com/celabshq/libcrux/pull/1560"}],"affected":[{"package":{"name":"libcrux-kem","ecosystem":"crates.io","purl":"pkg:cargo/libcrux-kem"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.0.10"}]}],"ecosystem_specific":{"affects":{"arch":[],"os":[],"functions":["libcrux_kem::PrivateKey::decode","libcrux_kem::PublicKey::decode"]},"affected_functions":null},"database_specific":{"informational":null,"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0331.json","categories":[],"cvss":"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"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}