CVE-2026-87735 Overview
CVE-2026-87735 affects the mirage-crypto-pk package for OCaml in versions prior to 2.3.0. The library raises an undocumented exception when processing a small message during RSA decryption or encryption operations. Applications that call the affected RSA primitives without catching this undocumented exception may terminate unexpectedly, producing a limited denial-of-service condition. The issue is classified under CWE-1284 (Improper Validation of Specified Quantity in Input). The vulnerability requires network access and low-level privileges to trigger, but does not compromise confidentiality or integrity of cryptographic material.
Critical Impact
An attacker who can submit crafted small messages to an RSA operation can trigger an undocumented exception, causing limited availability impact in OCaml applications using mirage-crypto-pk.
Affected Products
- mirage-crypto-pk OCaml package, all versions before 2.3.0
- OCaml applications performing RSA encryption or decryption with mirage-crypto-pk
- MirageOS-based unikernels and services that depend on the affected package
Discovery Timeline
- 2026-09-09 - CVE-2026-87735 published to NVD
- 2026-09-09 - Last updated in NVD database
Technical Details for CVE-2026-87735
Vulnerability Analysis
The mirage-crypto-pk package implements public-key cryptography primitives for OCaml, including RSA encryption and decryption. When callers pass a message that is smaller than the expected size for the RSA operation, the library raises an exception that is not documented in the public API. Applications that invoke RSA primitives with attacker-influenced input can therefore encounter an uncaught exception path. The result is process termination or request failure rather than data compromise. The issue is a robustness and input-validation defect in the RSA input-handling logic rather than a cryptographic weakness.
Root Cause
The root cause is improper validation of the size of the input message before the RSA modular arithmetic operation. The affected code paths raise an internal exception on undersized inputs instead of returning a documented error value or handling the case gracefully. Because the exception is undocumented, downstream consumers of the library have no reliable signal to guard against it. This matches the pattern described in CWE-1284, where a function does not properly validate a quantity supplied by its caller.
Attack Vector
Exploitation requires network reachability to an OCaml service that uses mirage-crypto-pk for RSA encryption or decryption and accepts attacker-controlled ciphertext or plaintext input. An authenticated user with low privileges submits a message smaller than the RSA modulus expects. The library raises the undocumented exception, and if the calling application does not catch it, the operation aborts. Repeated triggering can degrade service availability. There is no evidence of exploitation in the wild, no public proof-of-concept, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Refer to the OSV Vulnerability Report OSEC-2026-14 for the authoritative advisory.
Detection Methods for CVE-2026-87735
Indicators of Compromise
- Unhandled OCaml exceptions originating from mirage-crypto-pk RSA functions in application or unikernel logs
- Repeated abnormal termination of services performing RSA decryption after receiving external input
- Client requests containing RSA ciphertext or plaintext values shorter than the negotiated key size
Detection Strategies
- Inventory OCaml projects and MirageOS unikernels to identify use of mirage-crypto-pk at versions below 2.3.0 via opam list or lockfile inspection.
- Instrument RSA call sites to log input length and exception traces, and alert on undocumented exceptions raised from the library.
- Correlate application crash events with inbound requests containing undersized cryptographic payloads.
Monitoring Recommendations
- Forward application and unikernel logs into a centralized analytics platform and build detections for exception traces referencing mirage-crypto-pk.
- Track process restart counts and request error rates on services that expose RSA operations to network clients.
- Monitor software bill of materials (SBOM) feeds for advisories referencing mirage-crypto-pk and OSEC-2026-14.
How to Mitigate CVE-2026-87735
Immediate Actions Required
- Upgrade mirage-crypto-pk to version 2.3.0 or later in all OCaml projects and unikernel builds.
- Audit application code for RSA encryption and decryption call sites and ensure exceptions are caught and translated into safe error responses.
- Restrict network exposure of endpoints that perform RSA operations to authenticated and trusted clients until patches are deployed.
Patch Information
The fix is available in mirage-crypto-pk version 2.3.0. Rebuild dependent OCaml applications and MirageOS unikernels against the patched release, then redeploy. Consult the OSV Vulnerability Report OSEC-2026-14 for the definitive fixed-version metadata and downstream package references.
Workarounds
- Wrap calls to affected RSA functions in exception handlers that catch and log any exception, returning a controlled error to callers.
- Validate the length of any externally supplied message against the RSA modulus size before invoking the library, and reject undersized inputs early.
- Rate-limit endpoints that accept RSA inputs to reduce the impact of repeated exception-triggering requests.
# Configuration example: upgrade the affected package with opam
opam update
opam upgrade mirage-crypto-pk
opam list mirage-crypto-pk # verify version is >= 2.3.0
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

