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\"}"
}
"https://github.com/ocaml/security-advisories/blob/generated-osv/2026/OSEC-2026-17.json"
[
{
"deprecated": false,
"digest": {
"line_hashes": [
"253100655031408896178661557011204549452",
"113362364464772971462012477614628714472",
"220451132091679883283895790833697792756",
"334165316737258387663781664512606374028",
"196082931151109291350006464326251117629",
"77183314636161902609959944233985787023"
],
"threshold": 0.9
},
"id": "OSEC-2026-17-2e3f52a0",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/mirage/mirage-crypto/commit/1a61aeee7f593ec067612df1739ec905eab0450f",
"target": {
"file": "ec/native/point_operations.h"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "281251822188989173409330522136838094092",
"length": 557
},
"id": "OSEC-2026-17-8186780f",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/mirage/mirage-crypto/commit/1a61aeee7f593ec067612df1739ec905eab0450f",
"target": {
"file": "ec/native/point_operations.h",
"function": "table_select"
}
}
]
"2026-11-06T19:05:36Z"