CyberRota Analysis
AI-GeneratedThe mirage-crypto package prior to version 2.2.0 for OCaml is vulnerable due to improper handling of decryption processes in the AES.GCM and Chacha20 functions, which write decrypted plaintext to a caller-supplied buffer before validating the authenticity of the tag. This flaw allows an attacker to potentially retrieve sensitive data by exploiting the timing of the tag verification. Developers and organizations using this package should prioritize updating to version 2.2.0 or later to mitigate the risk of data exposure.
Original NVD 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.