liboqs HQC KEM Vulnerability in Post-Quantum Cryptography Library

Vulnerability

A design flaw has been identified in the Hamming Quasi-Cyclic (HQC) Key Encapsulation Mechanism (KEM) implemented in liboqs, a C-language cryptographic library for post-quantum algorithms. This flaw, present in liboqs versions prior to 0.13.0, allows many malformed ciphertexts to share the same implicit rejection value, creating a potential risk in key derivation protocols. While no concrete attacks on HQC are currently known, the algorithm's security guarantees are weaker than those of other post-quantum KEMs like Kyber or ML-KEM. As a precaution, HQC is disabled by default in liboqs starting from version 0.13.0.

Impact

The vulnerability in HQC KEM leads to a lack of proper binding between the shared secret and the ciphertext, allowing for potential key reuse across different public keys. This could disrupt key derivation processes and introduce vulnerabilities in protocols that rely on HQC.

Remediation

Users should avoid using HQC in liboqs versions prior to 0.13.0, and if HQC is necessary, ensure that the public encapsulation keys and ciphertexts are included in the key derivation process.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
0.0
exploitability
8.4
remediation
0.0
relevance
0.0
threat
4.8
urgency
2.9
incentive
5.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.