---
title: "Clangover: Clang-emitted secret-dependent branch in Kyber reference code (CVE-2024-37880)"
url: "https://pqt-19a6ffd695e12a.pages.dev/feed/2024-06-03-clangover-clang-emitted-secret-dependent-branch/"
date: "2024-06-03"
classification: "Implementation vulnerability · Demonstrated"
action: "Patch"
affects: ["ML-KEM"]
site: "PQ Tracker, maintained by zkSecurity"
reviewed: "2026-11-25"
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Clangover: Clang-emitted secret-dependent branch in Kyber reference code (CVE-2024-37880)

2024-06-03 · Implementation vulnerability · Demonstrated · Action: patch

Antoon Purnal showed that LLVM Clang (through 18.x, at several common optimization levels) compiled the constant-time poly_frommsg routine of the Kyber reference implementation into a secret-dependent branch, and released a proof of concept that recovers an ML-KEM-512 secret key in about ten minutes from decapsulation timing on the test machine. The reference code was patched on 2024-06-03 and liboqs in 0.10.1 (CVE-2024-36405). It is a compiler-induced implementation leak, not a weakness of ML-KEM.

- Affects: [ML-KEM](https://pqt-19a6ffd695e12a.pages.dev/algorithms/ml-kem/)

## Sources

- [CVE-2024-37880 record](https://www.cve.org/CVERecord?id=CVE-2024-37880)
- [antoonpurnal/clangover proof of concept](https://github.com/antoonpurnal/clangover)
- [pq-crystals/kyber fix commit 9b8d306 (2024-06-03)](https://github.com/pq-crystals/kyber/commit/9b8d30698a3e7449aeb34e62339d4176f11e3c6c)

## Related entries

- 2025-09-18 · Standards action · [NIST publishes SP 800-227 (Recommendations for Key-Encapsulation Mechanisms)](https://pqt-19a6ffd695e12a.pages.dev/feed/2025-09-18-nist-publishes-sp-800-227-recommendations-for-ke/)
- 2024-12 · Policy · [Australia: ASD ISM stops approving RSA, DH, ECDH and ECDSA beyond 2030](https://pqt-19a6ffd695e12a.pages.dev/feed/2024-12-australia-asd-ism-stops-approving-rsa-dh-ecdh-an/)
- 2024-08-13 · Standards action · [NIST publishes FIPS 203 (ML-KEM), FIPS 204 (ML-DSA) and FIPS 205 (SLH-DSA)](https://pqt-19a6ffd695e12a.pages.dev/feed/2024-08-13-nist-publishes-fips-203-ml-kem-fips-204-ml-dsa-a/)
- 2024-04-10 · Claim refuted · No action required · [Chen's claimed quantum algorithm for LWE withdrawn after a bug was found](https://pqt-19a6ffd695e12a.pages.dev/feed/2024-04-10-chen-s-claimed-quantum-algorithm-for-lwe-withdra/)
- 2023-12-20 · Theoretical result · No action required · [KEM binding notions defined; ML-KEM shown not to be MAL-BIND-K-CT or MAL-BIND-K-PK](https://pqt-19a6ffd695e12a.pages.dev/feed/2023-12-20-kem-binding-notions-defined-ml-kem-shown-not-to/)
- 2023-12-15 · Implementation vulnerability · Demonstrated · Action: patch · [KyberSlash1/KyberSlash2: secret-dependent division timing in Kyber implementations](https://pqt-19a6ffd695e12a.pages.dev/feed/2023-12-15-kyberslash1-kyberslash2-secret-dependent-divisio/)
