Python · Python-Cryptography · CVE-2018-10903
**Name of the Vulnerable Software and Affected Versions**
python-cryptography versions 1.9.0 through 2.3
**Description**
A flaw was found in the `finalize with tag` API, which did not enforce a minimum tag length. This allows an attacker to craft an invalid payload with a shortened tag, potentially leading to GCM tag forgeries and key leakage. If a user does not validate the input length prior to passing it to `finalize with tag`, an attacker could have a chance of passing the MAC check.
**Recommendations**
For python-cryptography versions 1.9.0 through 2.3, consider validating the input length prior to passing it to `finalize with tag` to prevent potential GCM tag forgeries and key leakage. As a temporary workaround, ensure that all tags passed to `finalize with tag` have a validated minimum length to minimize the risk of exploitation.