CVE-2026-87733
An issue was discovered in the mirage-crypto-ec function before 2.2.0 for OCaml. The ECDSA...
An issue was discovered in the mirage-crypto-ec function before 2.2.0 for OCaml. The ECDSA functions {P256,P384,P521}.Dsa.pub_of_octets accept 0x00, the encoding of the point at infinity, as a public key. With that public key, signatures can be forged without a private key.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.2
An issue was discovered in the mirage-crypto-ec function before 2.2.0 for OCaml. The ECDSA functions {P256,P384,P521}.Dsa.pub_of_octets accept 0x00, the encoding of the point at infinity, as a public key. With that public key, signatures can be forged without a private key.
- Record
CVE-2026-87733- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-295
- Updated
- 2026-11-02
EUVDEUVD-2026-74619
6.2
An issue was discovered in the mirage-crypto-ec function before 2.2.0 for OCaml. The ECDSA functions {P256,P384,P521}.Dsa.pub_of_octets accept 0x00, the encoding of the point at infinity, as a public key. With that public key, signatures can be forged without a private key.
- Record
EUVD-2026-74619- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-5v5p-5xxr-9xf8
6.2
An issue was discovered in the mirage-crypto-ec function before 2.2.0 for OCaml. The ECDSA...
An issue was discovered in the mirage-crypto-ec function before 2.2.0 for OCaml. The ECDSA functions {P256,P384,P521}.Dsa.pub_of_octets accept 0x00, the encoding of the point at infinity, as a public key. With that public key, signatures can be forged without a private key.
- Record
GHSA-5v5p-5xxr-9xf8- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-295
- Updated
- 2026-11-02
NVD
6.2
An issue was discovered in the mirage-crypto-ec function before 2.2.0 for OCaml. The ECDSA functions {P256,P384,P521}.Dsa.pub_of_octets accept 0x00, the encoding of the point at infinity, as a public key. With that public key, signatures can be forged without a private key.
- Record
CVE-2026-87733- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-295
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-87733
6.2
An issue was discovered in the mirage-crypto-ec function before 2.2.0 for OCaml. The ECDSA functions {P256,P384,P521}.Dsa.pub_of_octets accept 0x00, the encoding of the point at infinity, as a public key. With that public key, signatures can be forged without a private key.
- Record
DEBIAN-CVE-2026-87733- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVOSEC-2026-13
6.2
ECDSA accepts the point at infinity as a P256, P384, P521 public key
P256{,P384,P521}.Dsa.pub_of_octets accepts 0x00, the encoding of the point at infinity, as a public key. The Diffie-Hellman path rejects that point (point_of_octets); the ECDSA path skips the same check. Under such a key a signature can be forged with no private key, as the repro shows.
The same class is treated as high severity elsewhere. CVE-2022-21449 ("Psychic Signatures", OpenJDK) let a blank ECDSA signature verify, and CVE-2020-0601 ("CurveBall", Windows CryptoAPI) accepted a crafted ECC public key for certificate validation. Both are missing-validation forgeries on the same primitive.
Solution
Check for point at infinity in pub_of_octets.
Reproduction
module Dsa = Mirage_crypto_ec.P256.Dsa
(* 0x00 is the SEC1 encoding of the point at infinity A a signature using it can be forged for
any message with no private key. *)
let () =
Mirage_crypto_rng.(set_default_generator (create ~seed:"forge" (module Fortuna)));
let o_key = Result.get_ok (Dsa.pub_of_octets "\x00") in
let z = Digestif.SHA256.(to_raw_string (digest_string "transfer 1000eur to mallory")) in
let r, _ = Dsa.sign ~key:(Result.get_ok (Dsa.priv_of_octets z)) ~k:z z in
let s = String.make 31 '\000' ^ "\001" in
Printf.printf "0x00 accepted as a public key: %b\n" (Result.is_ok (Dsa.pub_of_octets "\x00"));
Printf.printf "forged (r, s=1) verifies under O: %b\n" (Dsa.verify ~key:o_key (r, s) z)
Timeline
- June 25th 2026: report to ocaml/security-advisories
- June 29th: acknowledgement of issue with several questions for the reporter
- July 6th: answers from reporter, including a patch
- July 27th: release of mirage-crypto 2.2.0 and security advisory
- Record
OSEC-2026-13- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-87733
6.2
An issue was discovered in the mirage-crypto-ec function before 2.2.0 for OCaml. The ECDSA functions {P256,P384,P521}.Dsa.pub_of_octets accept 0x00, the encoding of the point at infinity, as a public key. With that public key, signatures can be forged without a private key.
- Record
UBUNTU-CVE-2026-87733- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
ocaml-mirage-cryptoDebian:12 |
All versions, plus listed versions 0.10.7-10.11.1-10.11.1-20.11.1-30.11.2-1 Show 14 moreShow less0.11.2-20.11.3-11.1.0-11.1.0-22.0.0-12.0.1-12.0.2-12.0.3-12.1.0-12.2.0-12.2.0-22.3.0-12.4.0-12.4.1-1 |
None known |
ocaml-mirage-cryptoDebian:13 |
All versions, plus listed versions 2.0.0-12.0.1-12.0.2-12.0.3-12.1.0-1 Show 5 moreShow less2.2.0-12.2.0-22.3.0-12.4.0-12.4.1-1 |
None known |
ocaml-mirage-cryptoDebian:14 |
before 2.2.0-1, plus listed versions 2.0.0-12.0.1-12.0.2-12.0.3-12.1.0-1 |
2.2.0-1 |
mirage-crypto-ecopam |
before 2.2.0, plus listed versions 0.9.00.9.10.9.20.10.00.10.1 Show 45 moreShow less0.10.20.10.30.10.40.10.50.10.60.10.70.11.00.11.10.11.20.11.31.0.01.1.01.2.02.0.02.0.12.0.22.0.32.1.0v2.1.0v2.0.3v2.0.2v2.0.1v2.0.0v1.2.0v1.1.0v1.0.1v1.0.0v0.11.3v0.11.2v0.11.1v0.11.0v0.10.7v0.10.6v0.10.5v0.10.4v0.10.3v0.10.2v0.10.1v0.10.0v0.9.2v0.9.1v0.9.0v0.8.10v0.8.9v0.8.8 |
2.2.0 |
ocaml-mirage-cryptoUbuntu:22.04:LTS |
All versions, plus listed versions 0.10.5-40.10.5-4build2 |
None known |
ocaml-mirage-cryptoUbuntu:24.04:LTS |
All versions, plus listed versions 0.11.1-30.11.2-10.11.2-1build10.11.2-2build3 |
None known |
ocaml-mirage-cryptoUbuntu:26.10 |
All versions, plus listed versions 2.0.2-1build52.4.0-1 |
None known |
ocaml-mirage-cryptoUbuntu:26.04:LTS |
All versions, plus listed versions 2.0.1-1build12.0.2-1build12.0.2-1build22.0.2-1build32.0.2-1build5 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-87733 is a medium vulnerability (CVSS 6.2) in Ocaml Mirage-crypto-ec, published July 27, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.15%, the 4th percentile. Fixed in ocaml-mirage-crypto 2.2.0-1.
References
Left out here: 12 versions. The JSON record has them.