Skip to content

Secret-dependent branching in HQC reference implementation when compiled with Clang 17-20 for optimizations above -O0

Moderate
dstebila published GHSA-qq3m-rq9v-jfgm Jul 10, 2025

Package

liboqs

Affected versions

<= 0.13.0

Patched versions

0.14.0

Description

liboqs is a C-language cryptographic library that provides implementations of post-quantum cryptography algorithms.

Impact

Multiple secret-dependent branches have been identified in the reference implementation of the HQC key encapsulation mechanism when it is compiled with Clang for optimization levels above -O0 (-O1, -O2, etc).

A proof-of-concept local attack exploits this secret-dependent information to recover the entire secret key.

Patches

Fixed in liboqs version 0.14.0 and main branch with commit 4215362.

The vulnerability has been reported to the maintainers of the HQC reference implementation.

Credits

The vulnerability was reported by Zhenzhi Lai and Zhiyuan Zhang from the University of Melbourne and the Max Planck Institute for Security and Privacy.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

CVE ID

CVE-2025-52473

Weaknesses

No CWEs