The internal Point.of_octets function is missing a length check for compressed
points, and thus is raising an exception when a short buffer is provided. This
affects all NIST curves (P-256, P-384, P-521) and both Dsa.pub_of_octets and
Dh.key_exchange functions.
The fix is to check the length of the provided buffer.
{
"osv": "https://github.com/ocaml/security-advisories/tree/generated-osv/2026/OSEC-2026-15.json",
"human_link": "https://github.com/ocaml/security-advisories/tree/main/advisories/2026/OSEC-2026-15.md",
"cwe": [
"CWE-125",
"CWE-248"
]
}{
"opam_constraint": "mirage-crypto-ec {< \"2.3.0\"}",
"affected_bindings": [
"Mirage_crypto_ec.P256.Dsa.pub_of_octets",
"Mirage_crypto_ec.P256.Dh.key_exchange",
"Mirage_crypto_ec.P384.Dsa.pub_of_octets",
"Mirage_crypto_ec.P384.Dh.key_exchange",
"Mirage_crypto_ec.P521.Dsa.pub_of_octets",
"Mirage_crypto_ec.P521.Dh.key_exchange"
]
}