Panic on Decoding Short Hybrid Keys in libcrux-kem: CVSS 4.0 Vulnerability
Summary
RUSTSEC-2026-0331: Panic on Decoding Short Hybrid Keys. Affects libcrux-kem versions >= 0.0.0-0, < 0.0.10. Fixed in 0.0.10. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
libcrux-kem is a Rust library designed for key encapsulation mechanisms (KEMs) that supports various cryptographic operations. It provides functionalities for encoding and decoding private and public keys, which are essential for secure communications. However, the library has a vulnerability that can lead to application crashes when decoding improperly sized key slices, making it susceptible to denial-of-service attacks.
Vulnerability Detail
The vulnerability arises from the deserialization functions in libcrux-kem, specifically in X25519MlKem768Draft00PrivateKey::decode, X25519MlKem768Draft00PublicKey::decode, and XWingKemDraft06PublicKey::decode. These functions panic when they receive input slices shorter than the expected lengths for the respective key types. For instance, the X25519MlKem768Draft00 private key requires a slice of at least 2400 bytes, while the public keys require at least 1184 bytes. This flaw can be exploited by attackers to cause applications to crash, leading to potential service disruptions.
How To Fix
Latest published version: 0.0.10 as of 22 Oct 2026
The newest release already contains this fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There are no specific workarounds mentioned for this vulnerability. The best course of action is to upgrade to the patched version of the library.
Conclusion
In summary, the libcrux-kem library has a vulnerability that can cause application panics when decoding improperly sized key slices. Users are strongly encouraged to upgrade to version 0.0.10 to mitigate this risk. Utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.
See every vulnerability recorded for libcrux-kem →
FAQ
The CVSS score of this vulnerability is 4.0, indicating a moderate severity level.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup at Vulert Scanner.
If you do not update, your application may be vulnerable to crashes caused by attackers exploiting this deserialization flaw.
The affected functions are libcrux_kem::PrivateKey::decode and libcrux_kem::PublicKey::decode.
While the vulnerability primarily leads to application crashes, it does not directly cause data loss. However, it can disrupt service availability.
References
Related vulnerabilities
Recent vulnerabilities recorded for libcrux-kem.