Panic on Decoding Short Hybrid Keys
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`.
- Products
- libcrux-kem
- Affected versions
- Not specified
- Fixed versions
- 0.0.10
- CVEs
- Not specified
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 28 Oct 2026, 03:38 UTC · Revision 1
Source evidence
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`.
osv:RUSTSEC-2026-0331
libcrux-kem
Fixed versions: 0.0.10
Complete source record
{
"id": "5c640014dd07338340435c38d192199ae54f5ca1899bd781b3676f229a052058",
"url": "https://osv.dev/vulnerability/RUSTSEC-2026-0331",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Panic on Decoding Short Hybrid Keys",
"summary": "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`.",
"evidence": "osv:RUSTSEC-2026-0331",
"products": [
{
"name": {
"value": "libcrux-kem",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "0.0.10",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "RUSTSEC-2026-0331",
"aliases": [
"RUSTSEC-2026-0331"
],
"metrics": [
{
"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"
}
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0.0.0-0"
},
{
"fixed": "0.0.10"
}
]
}
],
"package": {
"name": "libcrux-kem",
"purl": "pkg:cargo/libcrux-kem",
"ecosystem": "crates.io"
},
"database_specific": {
"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",
"source": "https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0331.json",
"categories": [],
"informational": null
},
"ecosystem_specific": {
"affects": {
"os": [],
"arch": [],
"functions": [
"libcrux_kem::PrivateKey::decode",
"libcrux_kem::PublicKey::decode"
]
},
"affected_functions": null
}
}
],
"modified": "2026-10-07T08:30:02.870588917Z",
"provider": "osv",
"references": [
"https://crates.io/crates/libcrux-kem",
"https://rustsec.org/advisories/RUSTSEC-2026-0331.html",
"https://github.com/celabshq/libcrux/pull/1560"
],
"provider_metadata": {
"license": "CC0-1.0"
}
},
"related_cves": [],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 94612,
"published_at": "2026-08-24T12:00:00+00:00"
}