CVE-2026-87732: CWE-347 Improper Verification of Cryptographic Signature in OCaml mirage-crypto
An issue was discovered in the mirage-crypto package before 2.2.0 for OCaml. The AES.GCM.authenticate_decrypt_into and Chacha20.authenticate_decrypt_into functions write the decrypted plaintext into a caller-provided buffer and only then compares the tag. On a forged tag, the functions returns false, but the destination buffer already holds the full plaintext.
AI Analysis
Technical Summary
The mirage-crypto package versions prior to 2.2.0 for OCaml contain a cryptographic vulnerability (CVE-2026-87732) in the AES.GCM.authenticate_decrypt_into and Chacha20.authenticate_decrypt_into functions. These functions decrypt data into a buffer provided by the caller and only afterward verify the authentication tag. If the tag verification fails due to a forged tag, the functions return false but do not erase or prevent the plaintext from being present in the buffer. This behavior can lead to exposure of plaintext data despite authentication failure, representing a CWE-347 (Improper Verification of Cryptographic Signature) weakness.
Potential Impact
The vulnerability results in the decrypted plaintext being available in the caller's buffer even when the authentication tag is invalid or forged. This can lead to information disclosure if an attacker can access the buffer contents after a failed authentication attempt. There is no impact on confidentiality from successful decryption since the tag verification fails, but the presence of plaintext in memory despite authentication failure is a security concern. The CVSS score is 6.2 (medium severity) with no confidentiality impact but high integrity impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Users should upgrade to mirage-crypto version 2.2.0 or later once available, as the issue is described as affecting versions before 2.2.0. Until a patch is applied, avoid using the affected functions in security-critical contexts or ensure that buffers are securely cleared after failed authentication attempts.
CVE-2026-87732: CWE-347 Improper Verification of Cryptographic Signature in OCaml mirage-crypto
Description
An issue was discovered in the mirage-crypto package before 2.2.0 for OCaml. The AES.GCM.authenticate_decrypt_into and Chacha20.authenticate_decrypt_into functions write the decrypted plaintext into a caller-provided buffer and only then compares the tag. On a forged tag, the functions returns false, but the destination buffer already holds the full plaintext.
CVSS v3.1
Score 6.2medium
Affected software
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 mirage-crypto package versions prior to 2.2.0 for OCaml contain a cryptographic vulnerability (CVE-2026-87732) in the AES.GCM.authenticate_decrypt_into and Chacha20.authenticate_decrypt_into functions. These functions decrypt data into a buffer provided by the caller and only afterward verify the authentication tag. If the tag verification fails due to a forged tag, the functions return false but do not erase or prevent the plaintext from being present in the buffer. This behavior can lead to exposure of plaintext data despite authentication failure, representing a CWE-347 (Improper Verification of Cryptographic Signature) weakness.
Potential Impact
The vulnerability results in the decrypted plaintext being available in the caller's buffer even when the authentication tag is invalid or forged. This can lead to information disclosure if an attacker can access the buffer contents after a failed authentication attempt. There is no impact on confidentiality from successful decryption since the tag verification fails, but the presence of plaintext in memory despite authentication failure is a security concern. The CVSS score is 6.2 (medium severity) with no confidentiality impact but high integrity impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Users should upgrade to mirage-crypto version 2.2.0 or later once available, as the issue is described as affecting versions before 2.2.0. Until a patch is applied, avoid using the affected functions in security-critical contexts or ensure that buffers are securely cleared after failed authentication attempts.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-vqxm-cgmv-2pcr
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-87732"]
- Ecosystems
- []
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6aa15f79acd9273b49618317
Added to database: 09/09/2026, 13:30:33 UTC
Last enriched: 09/09/2026, 13:56:01 UTC
Last updated: 09/10/2026, 02:52:00 UTC
Views: 4
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.