CVE-2026-87732: Medium severity npm/mirage-crypto vulnerability

Published Sep 9, 2026
·
Updated

An issue was discovered in the mirage-crypto package before 2.2.0 for OCaml. The AES.GCM.authenticatedecryptinto and Chacha20.authenticatedecryptinto 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.

Affected Software

1 affected component
npm/mirage-crypto<2.2.0

Event History

Sep 9, 2026
CVE Published
via MITRE·04:03 AM
Data Sourced
via MITRE·04:03 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What does an attacker need to exploit this issue?

An attacker needs to cause forged authenticated ciphertext to be processed by AES.GCM.authenticate_decrypt_into or Chacha20.authenticate_decrypt_into. No privileges or user interaction are indicated in the provided severity vector.

2

Who is exposed in practice?

Applications using affected mirage-crypto versions and either of the authenticate_decrypt_into APIs are exposed if they process attacker-controlled ciphertext and may use the caller-provided destination buffer despite authentication failure.

3

How can I tell whether my application is affected?

Check whether it uses mirage-crypto before 2.2.0 and calls AES.GCM.authenticate_decrypt_into or Chacha20.authenticate_decrypt_into. On a forged tag, affected behavior returns false after the destination buffer has already been filled with decrypted plaintext.

4

What can be done if upgrading is not immediately possible?

Do not consume, expose, or act on the destination buffer unless the authentication function reports success. Clear or discard the buffer when the function returns false to prevent unauthenticated plaintext from being used.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203