osec-2026-14

CVSS 4.3 osv_ocaml
Description

The RSA decrypt and encrypt functions raise an Invalid_argument exception if the message is smaller than 2. This leads to X509 certificates with a signature value of 0 or 1 to throw this Invalid_argument exception instead of a proper error. ## Fix The fix is to reuse the Insufficient_key exception, which is documented and caught further up in the stack. ## Timeline - July 28th 2026: report to security@ocaml.org - August 7th: release of mirage-crypto-pk 2.3.0 and security advisory

Timeline
Published
unknown
Last Modified
unknown
CVSS Details

CVSS details not available.

Affected Products

No product information available.

Weaknesses (CWE)
References

No references available.

Linked Vulnerabilities

No linked vulnerabilities found.

{
  "affected": [
    {
      "database_specific": {
        "source": "https://github.com/ocaml/security-advisories/blob/generated-osv/2026/OSEC-2026-14.json"
      },
      "ecosystem_specific": {
        "affected_bindings": [
          "Mirage_crypto_pk.Rsa.encrypt",
          "Mirage_crypto_pk.Rsa.decrypt",
          "Mirage_crypto_pk.Rsa.PKCS1.encrypt",
          "Mirage_crypto_pk.Rsa.PKCS1.decrypt",
          "Mirage_crypto_pk.Rsa.PKCS1.sig_encode",
          "Mirage_crypto_pk.Rsa.PKCS1.sig_decode",
          "Mirage_crypto_pk.Rsa.PKCS1.sign",
          "Mirage_crypto_pk.Rsa.PKCS1.verify",
          "Mirage_crypto_pk.Rsa.OAEP.encrypt",
          "Mirage_crypto_pk.Rsa.OAEP.decrypt",
          "Mirage_crypto_pk.Rsa.PSS.sign",
          "Mirage_crypto_pk.Rsa.PSS.verify"
        ],
        "opam_constraint": "mirage-crypto-pk {< \"2.3.0\"}"
      },
      "package": {
        "ecosystem": "opam",
        "name": "mirage-crypto-pk",
        "purl": "pkg:opam/mirage-crypto-pk"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.3.0"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "a0f59a0c90eb067505b55a03d3bb104eacd6dd33"
            }
          ],
          "repo": "https://github.com/mirage/mirage-crypto.git",
          "type": "GIT"
        }
      ],
      "versions": [
        "0.6.0",
        "0.6.1",
        "0.6.2",
        "0.7.0",
        "0.8.0",
        "0.8.1",
        "0.8.2",
        "0.8.3",
        "0.8.4",
        "0.8.5",
        "0.8.6",
        "0.8.7",
        "0.8.8",
        "0.8.9",
        "0.8.10",
        "0.9.0",
        "0.9.1",
        "0.9.2",
        "0.10.0",
        "0.10.1",
        "0.10.2",
        "0.10.3",
        "0.10.4",
        "0.10.5",
        "0.10.6",
        "0.10.7",
        "0.11.0",
        "0.11.1",
        "0.11.2",
        "0.11.3",
        "1.0.0",
        "1.1.0",
        "1.2.0",
        "2.0.0",
        "2.0.1",
        "2.0.2",
        "2.0.3",
        "2.1.0",
        "2.2.0",
        "v2.2.0",
        "v2.1.0",
        "v2.0.3",
        "v2.0.2",
        "v2.0.1",
        "v2.0.0",
        "v1.2.0",
        "v1.1.0",
        "v1.0.1",
        "v1.0.0",
        "v0.11.3",
        "v0.11.2",
        "v0.11.1",
        "v0.11.0",
        "v0.10.7",
        "v0.10.6",
        "v0.10.5",
        "v0.10.4",
        "v0.10.3",
        "v0.10.2",
        "v0.10.1",
        "v0.10.0",
        "v0.9.2",
        "v0.9.1",
        "v0.9.0",
        "v0.8.10",
        "v0.8.9",
        "v0.8.8",
        "v0.8.7",
        "v0.8.6",
        "v0.8.5",
        "v0.8.4",
        "v0.8.3",
        "v0.8.2",
        "v0.8.1",
        "v0.8.0",
        "v0.7.0",
        "v0.6.2",
        "v0.6.1",
        "v0.6.0"
      ]
    }
  ],
  "aliases": [
    "CVE-2026-87735"
  ],
  "credits": [
    {
      "name": "Thomas Gazagnaire",
      "type": "REPORTER"
    },
    {
      "name": "Hannes Mehnert",
      "type": "REMEDIATION_DEVELOPER"
    }
  ],
  "database_specific": {
    "cwe": [
      "CWE-248"
    ],
    "human_link": "https://github.com/ocaml/security-advisories/tree/main/advisories/2026/OSEC-2026-14.md",
    "osv": "https://github.com/ocaml/security-advisories/tree/generated-osv/2026/OSEC-2026-14.json"
  },
  "details": "The RSA decrypt and encrypt functions raise an Invalid_argument exception if the\nmessage is smaller than 2. This leads to X509 certificates with a signature\nvalue of 0 or 1 to throw this Invalid_argument exception instead of a proper\nerror.\n\n## Fix\n\nThe fix is to reuse the Insufficient_key exception, which is documented and\ncaught further up in the stack.\n\n## Timeline\n\n- July 28th 2026: report to security@ocaml.org\n- August 7th: release of mirage-crypto-pk 2.3.0 and security advisory",
  "id": "OSEC-2026-14",
  "modified": "2026-09-10T10:15:04.486277223Z",
  "published": "2026-08-07T13:00:00Z",
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "RSA signature verification raises undocumented exception"
}
View JSON API Download JSON