# CVE-2026-87732: AEAD `decrypt_into` functions writes plaintext before checking the tag

- Severity: Medium 6.2 (CVSS:3.1, scored by mitre) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.11%, higher than 1% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-27T19:00:00.000Z
- Modified: 2026-11-06T13:45:03.730Z
- Also known as: OSEC-2026-12
- Weaknesses: CWE-347
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- OCaml mirage-crypto: before 2.2.0
- mirage-crypto (opam): before 2.2.0
- https://github.com/mirage/mirage-crypto.git: before 25e7570aec91e092b347561c23f84b6ec39e7163

## Every score

- mitre: CVSS:3.1 6.2 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- OCaml Security Advisories: CVSS:3.1 6.2 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`

## References

- <https://osv.dev/vulnerability/OSEC-2026-12> (exploit)

## Sources

- CVE List: [CVE-2026-87732](https://www.cve.org/CVERecord?id=CVE-2026-87732), CVE Terms of Use, modified 2026-09-09
- OCaml Security Advisories: [OSEC-2026-12](https://osv.dev/vulnerability/OSEC-2026-12), CC0-1.0, modified 2026-11-06
- NVD: [CVE-2026-87732](https://nvd.nist.gov/vuln/detail/CVE-2026-87732), Public domain, modified 2026-09-09

---

Page: https://cve.day/CVE-2026-87732 · Whole record: https://cve.day/CVE-2026-87732.json · Rebuilt by cve.day 2026-11-25T22:59:37.701Z
