CVE-2018-10903: python-cryptography - Cryptography Flaw Allows GCM Tag Forgeries

cryptography Updated 02 Oct 2025

Summary

31/07/2018
Yes i
High
7.5

CVE-2018-10903: PyCA Cryptography vulnerable to GCM tag forgery. Affects cryptography versions >= 1.9.0, < 2.3. Fixed in 2.3. How to fix ↓

Also tracked for

The same CVE-2018-10903 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

python-cryptography is a Python library that provides cryptographic recipes and primitives. It is widely used for secure communication, data integrity, and encryption. This vulnerability affects versions between >=1.9.0 and <2.3 of the library. The flaw lies in the finalize_with_tag API, which fails to enforce a minimum tag length. This oversight allows an attacker to craft an invalid payload with a shortened tag, increasing the chances of passing the MAC check. GCM tag forgeries can lead to key leakage, compromising the security of the cryptographic operations performed by the library.

Vulnerability Detail

The vulnerability (CVE-2018-10903) in python-cryptography arises due to the lack of enforcement of a minimum tag length in the finalize_with_tag API. By not validating the input length before passing it to finalize_with_tag, an attacker can create a malicious payload with a shortened tag. This increases the probability of passing the MAC check, allowing the attacker to forge GCM tags. Successful tag forgeries can result in key leakage, undermining the confidentiality and integrity of cryptographic operations.

How To Fix

Latest published version: 50.0.2 as of 22 Oct 2026

pip install --upgrade "cryptography==50.0.2"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3

This is the first release that contains the fix.

pip install --upgrade "cryptography==2.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to upgrade to the fixed version of the python-cryptography library to address the issue effectively.

Conclusion

The vulnerability in python-cryptography (CVE-2018-10903) allows for GCM tag forgeries, increasing the risk of key leakage. To mitigate this issue, it is crucial to upgrade to version 2.3 or later of the library. This upgrade ensures the enforcement of a minimum tag length and proper validation of input, safeguarding cryptographic operations. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for cryptography →

Share this vulnerability

FAQ

python-cryptography is a Python library that provides cryptographic recipes and primitives. It is commonly used for secure communication, data integrity, and encryption.

Versions between >=1.9.0 and <2.3 of python-cryptography are affected by this vulnerability.

The vulnerability allows an attacker to forge GCM tags, increasing the chances of passing the MAC check. Successful tag forgeries can lead to key leakage, compromising the security of cryptographic operations.

To fix this vulnerability, it is recommended to upgrade to version 2.3 or later of the python-cryptography library.

No, there is no known workaround for this vulnerability. Upgrading to the fixed version is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for cryptography.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 50.0.2 as of 22 Oct 2026

pip install --upgrade "cryptography==50.0.2"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3

This is the first release that contains the fix.

pip install --upgrade "cryptography==2.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback