---
id: RUSTSEC-2026-0331
title: Panic on Decoding Short Hybrid Keys
summary: Panic on Decoding Short Hybrid Keys
severity: none
vendor: libcrux-kem
product: libcrux-kem
ecosystem: rust
affected:
  - 'libcrux-kem >= 0.0.0-0, < 0.0.10'
patched:
  - libcrux-kem 0.0.10
published: '2026-08-24'
updated: '2026-10-07'
sourceUpdated: '2026-10-07T08:30:02.870588917Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/RUSTSEC-2026-0331'
references:
  - url: 'https://crates.io/crates/libcrux-kem'
  - url: 'https://rustsec.org/advisories/RUSTSEC-2026-0331.html'
  - url: 'https://github.com/celabshq/libcrux/pull/1560'
tags:
  - osv
  - rust
ingestedAt: '2026-10-08T07:34:51.740Z'
---

## Overview

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

## Affected packages

- `libcrux-kem >= 0.0.0-0, < 0.0.10`

## Remediation

Upgrade to a patched release:

- `libcrux-kem 0.0.10`
