CVE-2024-54137
📋 TL;DR
A correctness error in liboqs' HQC key encapsulation mechanism causes incorrect shared secret generation during decapsulation with malformed ciphertexts. This affects systems using liboqs for post-quantum cryptography, potentially compromising cryptographic operations. The vulnerability allows attackers to manipulate cryptographic outputs, undermining security guarantees.
💻 Affected Systems
- liboqs
📦 What is this software?
Liboqs by Openquantumsafe
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of encrypted communications using HQC, enabling decryption of sensitive data or impersonation attacks in quantum-resistant systems.
Likely Case
Degraded cryptographic security where attackers can force incorrect key agreement, potentially breaking forward secrecy or enabling protocol-level attacks.
If Mitigated
Limited impact if proper key rotation and monitoring are in place, though cryptographic integrity remains compromised.
🎯 Exploit Status
Exploitation requires ability to submit malformed ciphertexts to decapsulation function, typically requiring some level of system access or protocol interaction.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.12.0
Vendor Advisory: https://github.com/open-quantum-safe/liboqs/security/advisories/GHSA-gpf4-vrrw-r8v7
Restart Required: Yes
Instructions:
1. Update liboqs to version 0.12.0 or later. 2. Recompile any applications using liboqs. 3. Restart affected services. 4. Regenerate cryptographic keys if HQC was used.
🔧 Temporary Workarounds
Disable HQC Algorithm
allTemporarily disable HQC algorithm usage in applications until patching is complete.
Configure applications to use alternative post-quantum algorithms instead of HQC.
🧯 If You Can't Patch
- Implement network segmentation to limit access to systems using vulnerable liboqs versions.
- Monitor for unusual cryptographic operations or failed decapsulation attempts in logs.
🔍 How to Verify
Check if Vulnerable:
Check liboqs version: if using version <0.12.0 and HQC algorithm is enabled, system is vulnerable.
Check Version:
Check library version through application configuration or package manager (e.g., 'dpkg -l liboqs' on Debian-based systems).
Verify Fix Applied:
Verify liboqs version is 0.12.0 or later and test HQC functionality with known test vectors.
📡 Detection & Monitoring
Log Indicators:
- Failed or abnormal cryptographic operations involving HQC
- Unexpected decapsulation errors
Network Indicators:
- Unusual patterns in cryptographic protocol exchanges using HQC
SIEM Query:
Search for error messages containing 'HQC' or 'decapsulation' in application logs.