CVE-2026-87732: CWE-347 Improper Verification of Cryptographic Signature in OCaml mirage-crypto
Description
CVE-2026-87732 is a vulnerability in the mirage-crypto package for OCaml versions before 2.2.0. The AES.GCM and Chacha20 authenticate_decrypt_into functions decrypt data into a buffer before verifying the cryptographic tag. If the tag is forged, the functions return false but the buffer still contains the decrypted plaintext, potentially exposing sensitive data.
CVSS v3.1
6.2medium
Affected software
OCaml
mirage-crypto
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in mirage-crypto (before version 2.2.0) involves improper verification of cryptographic signatures (CWE-347). Specifically, the AES.GCM.authenticate_decrypt_into and Chacha20.authenticate_decrypt_into functions write decrypted plaintext into a caller-provided buffer before checking the authentication tag. If the tag verification fails (indicating a forged tag), the functions return false but do not erase or prevent access to the plaintext already written in the buffer. This behavior can lead to exposure of plaintext data despite failed authentication.
Potential Impact
An attacker who provides a forged authentication tag can cause the functions to output decrypted plaintext into the buffer even though the tag verification fails. This can lead to unauthorized disclosure of plaintext data, impacting data integrity and confidentiality. The CVSS score of 6.2 (medium severity) reflects the local attack vector and the lack of confidentiality impact but high integrity impact.
Mitigation Recommendations
A fix is available in mirage-crypto version 2.2.0 and later. Users should upgrade to version 2.2.0 or newer to ensure that plaintext is not written before tag verification completes successfully. Until then, avoid using affected versions or implement application-level checks to prevent use of decrypted data if authentication fails. Patch status is confirmed by the version boundary in the affectedVersions field.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mitre
- Date Reserved
- 09/09/2026
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6aa0e2c5acd9273b49baa905
Added to database: 09/09/2026, 04:38:29 UTC
Last enriched: 10/17/2026, 23:22:39 UTC
Last updated: 10/24/2026, 08:45:13 UTC
Views: 107
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.