HQC reference decapsulation silently skipped implicit rejection (CVE-2024-54137)
Quarkslab fuzzing found that HQC's reference code, as shipped in liboqs and PQClean, extracted the public key from the wrong offset of the secret key after a 2023 spec change added a secret rejection value. A second faulty comparison masked the error. Malformed ciphertexts were therefore decapsulated to a key derived from their decryption instead of the pseudorandom rejection value. Fixed in liboqs 0.12.0 and by the HQC team in February 2025.
Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.
Background
Implicit rejection is the part of the Fujisaki-Okamoto transform that makes a KEM IND-CCA2 secure: invalid ciphertexts must produce an unpredictable key, not a decryption-dependent one. The advisory says no concrete attack was identified, but losing implicit rejection removes the CCA protection the design depends on. This was a code bug in the reference implementation; the HQC specification was correct on this point. It is separate from the specification-level salt flaw reported in 2025 (CVE-2025-48946).
Sources
- cveliboqs GHSA-gpf4-vrrw-r8v7 / CVE-2024-54137Open Quantum Safe, github.com
- cveCVE-2024-54137NVD, nvd.nist.gov
- blogFinding bugs in implementations of HQC, the fifth post-quantum standardQuarkslab, blog.quarkslab.com