The scalar multiplication includes pre-computed tables for speedup (introduced in mirage-crypto-ec 0.11.3). The lookup algorithm for these tables performs secret-dependent reads instead of scanning the entire table.
Instead of using the index n - 1, where n is secret-dependent, use i - 1, as done in the Go reference implementation. If n is 0, there is a out-of-bounds read before the patch.
{
"cwe": [
"CWE-208"
],
"human_link": "https://github.com/ocaml/security-advisories/tree/main/advisories/2026/OSEC-2026-17.md",
"osv": "https://github.com/ocaml/security-advisories/tree/generated-osv/2026/OSEC-2026-17.json"
}{
"affected_bindings": [
"Mirage_crypto_ec.P256.Dh.share",
"Mirage_crypto_ec.P256.Dsa.generate",
"Mirage_crypto_ec.P256.Dsa.sign",
"Mirage_crypto_ec.P256.Dsa.pub_of_priv",
"Mirage_crypto_ec.P384.Dh.share",
"Mirage_crypto_ec.P384.Dsa.generate",
"Mirage_crypto_ec.P384.Dsa.sign",
"Mirage_crypto_ec.P384.Dsa.pub_of_priv",
"Mirage_crypto_ec.P521.Dh.share",
"Mirage_crypto_ec.P521.Dsa.generate",
"Mirage_crypto_ec.P521.Dsa.sign",
"Mirage_crypto_ec.P521.Dsa.pub_of_priv"
],
"opam_constraint": "mirage-crypto-ec {>= \"0.11.3\" & < \"2.4.0\"}"
}