PyCA Cryptography vulnerable to GCM tag forgery
A flaw was found in python-cryptography versions between >=1.9.0 and <2.3. The finalize_with_tag API did not enforce a minimum tag length. If a user did not validate the input length prior to passing it to finalize_with_tag an attacker could craft an invalid payload with a shortened tag (e.g. 1 byte) such that they would have a 1 in 256 chance of passing the MAC check. GCM tag forgeries can cause key leakage.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | cryptography | >= 1.9.0, < 2.3 | 2.3 |
References
- https://github.com/pyca/cryptography/pull/4342/commits/688e0f673bfbf43fa898994326c6877f00ab19ef
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-10903
- https://usn.ubuntu.com/3720-1/
- https://access.redhat.com/errata/RHSA-2018:3600
- https://github.com/advisories/GHSA-fcf9-3qw3-gxmj
- https://nvd.nist.gov/vuln/detail/CVE-2018-10903
- https://github.com/pyca/cryptography/pull/4342
- https://github.com/pyca/cryptography/commit/d4378e42937b56f473ddade2667f919ce32208cb
- https://github.com/pyca/cryptography
- https://github.com/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2018-52.yaml
- https://usn.ubuntu.com/3720-1
- CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N- Weakness (CWE)
CWE-20- Platform
- Python (PyPI)
- Package
cryptography- Disclosed
- 30.07.2018
- Updated
- 11.10.2026 11:19
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2018-52 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-fcf9-3qw3-gxmj - CC BY 4.0
Vulnerability history: cryptography
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 24
- First → latest
- 03.2017 08.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 12
- Medium 7
- Low 5
Disclosures per year
- 2017: 1
- 2018: 1
- 2019: 0
- 2020: 1
- 2021: 1
- 2022: 1
- 2023: 7
- 2024: 4
- 2025: 1
- 2026: 7
-
PyCA Cryptography vulnerable to GCM tag forgery this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.