CVE-2026-87736 Overview
CVE-2026-87736 is an out-of-bounds read vulnerability in the mirage-crypto-ec package for OCaml, affecting versions before 2.3.0. The flaw resides in the elliptic curve (EC) public key handling routine for compressed points. When the library processes a malformed compressed EC public key, it reads memory beyond the intended buffer boundary. The issue is categorized under [CWE-125] Out-of-Bounds Read. Exploitation requires network reachability and low-level privileges, and impacts availability of the affected process without disclosing sensitive information or altering integrity.
Critical Impact
An attacker submitting a crafted compressed EC public key can trigger an out-of-bounds read in mirage-crypto-ec, potentially causing process instability or crash in applications performing EC key parsing.
Affected Products
- mirage-crypto-ec package for OCaml, all versions before 2.3.0
- OCaml applications and MirageOS unikernels linking the vulnerable package
- Downstream TLS and cryptographic services that parse untrusted EC public keys via mirage-crypto-ec
Discovery Timeline
- 2026-09-09 - CVE-2026-87736 published to NVD
- 2026-09-09 - Last updated in NVD database
Technical Details for CVE-2026-87736
Vulnerability Analysis
The vulnerability affects mirage-crypto-ec, the elliptic curve cryptography component of the mirage-crypto suite used across OCaml and MirageOS deployments. When the library parses a compressed EC public key, it fails to properly validate the input length against the expected size for the target curve. As a result, decoding logic reads bytes past the end of the supplied buffer. The condition is reachable in any code path that accepts external EC public keys, including TLS handshakes and signature verification workflows.
Root Cause
The root cause is missing or insufficient bounds checking during decompression of compressed EC point encodings. Compressed points use a leading tag byte followed by the x-coordinate. If the buffer supplied is shorter than the curve's expected coordinate length, the parser dereferences memory outside the allocated region. This is a classic [CWE-125] Out-of-Bounds Read pattern in low-level byte parsing code.
Attack Vector
Exploitation occurs over the network by presenting a malformed compressed EC public key to a service that uses mirage-crypto-ec for parsing. The attacker requires low privileges consistent with the ability to submit a public key to the affected endpoint. Successful exploitation impacts availability by inducing crashes or undefined behavior in the consuming process. Confidentiality and integrity are not directly affected. No public exploit or proof-of-concept has been published for this issue at the time of writing.
The vulnerability manifests during compressed point decoding in the EC parser. See the OSV Vulnerability Report OSEC-2026-15 for advisory details and the fixed release notes.
Detection Methods for CVE-2026-87736
Indicators of Compromise
- Unexpected crashes, segmentation faults, or abnormal terminations in OCaml services performing EC key parsing or TLS handshakes.
- Malformed or truncated compressed EC public keys observed in TLS ClientHello or ServerHello key exchange messages.
- Repeated handshake failures from a single source targeting endpoints backed by mirage-crypto-ec.
Detection Strategies
- Inventory OCaml and MirageOS build artifacts to identify uses of mirage-crypto-ec at versions earlier than 2.3.0.
- Enable verbose logging on cryptographic and TLS layers to capture parse errors and abnormal termination stack traces.
- Correlate application crash telemetry with inbound requests that carry compressed EC public keys.
Monitoring Recommendations
- Alert on process restarts and crash loops for services that expose EC-based TLS or signature verification endpoints.
- Monitor network telemetry for anomalous key exchange message lengths inconsistent with the negotiated curve.
- Track dependency manifests in CI pipelines to flag builds pinning vulnerable mirage-crypto-ec releases.
How to Mitigate CVE-2026-87736
Immediate Actions Required
- Upgrade mirage-crypto-ec to version 2.3.0 or later across all OCaml and MirageOS projects.
- Rebuild and redeploy any unikernels, binaries, or container images that statically link the affected package.
- Audit downstream libraries and applications that depend on mirage-crypto-ec and confirm they resolve to the patched release.
Patch Information
The issue is fixed in mirage-crypto-ec version 2.3.0. Refer to the OSV Vulnerability Report OSEC-2026-15 for the authoritative advisory and links to the upstream fix. Update dependency constraints in dune-project and opam files to require mirage-crypto-ec >= 2.3.0.
Workarounds
- Restrict network exposure of services that parse untrusted EC public keys until the patched version is deployed.
- Place a validating proxy or WAF in front of TLS endpoints to reject malformed key exchange messages where feasible.
- Constrain accepted EC curves to a minimum set and enforce strict length validation at the application layer before invoking the vulnerable parser.
# Configuration example: pin the patched version via opam
opam update
opam install mirage-crypto-ec.2.3.0
# Or update the opam file constraint
# depends: [ "mirage-crypto-ec" {>= "2.3.0"} ]
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

