CVE-2018-10903 PyCA Cryptography vulnerable to GCM tag forgery

High 7.5 Published Updated

Attackers can forge GCM tags due to missing length validation, potentially leaking keys or bypassing integrity checks in applications using python-cryptography.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2018-10903?

CVE-2018-10903 is a high-severity vulnerability in Canonical Ubuntu Linux, published on 30 Jul 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-20

Which versions are affected by CVE-2018-10903?

3 open source packages ship an affected version, including cryptography. It affects 3 products.

PackageAffectedFixed in
cryptography PyPIFrom 1.92.3
cryptography PyPIFrom 1.9.02.3
cryptography PyPIFrom 1.9.02.3
Linux distribution packages (37)
python-cryptography Red Hat:openstack:13::el7All versions0:2.1.4-3.el7ost
python-cryptography-debuginfo Red Hat:openstack:13::el7All versions0:2.1.4-3.el7ost
python2-cryptography Red Hat:openstack:13::el7All versions0:2.1.4-3.el7ost
python-cffi SUSE:Enterprise Storage 5All versions1.11.2-5.11.1
python-cryptography SUSE:Enterprise Storage 5All versions2.1.4-7.28.2
python-xattr SUSE:Enterprise Storage 5All versions0.7.5-6.3.2
python-cryptography SUSE:Enterprise Storage 7All versions2.9.2-150200.13.1
python-cffi SUSE:HPE Helion OpenStack 8All versions1.11.2-5.11.1
python-cryptography SUSE:HPE Helion OpenStack 8All versions2.0.3-3.3.1
python-cryptography SUSE:HPE Helion OpenStack 8All versions2.1.4-7.28.2
python-xattr SUSE:HPE Helion OpenStack 8All versions0.7.5-6.3.2
python-cryptography SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOSAll versions2.9.2-150200.13.1
python-cryptography SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSAll versions2.9.2-150200.13.1
python-cryptography SUSE:Linux Enterprise Micro 5.1All versions2.9.2-150200.13.1
python-cryptography SUSE:Linux Enterprise Micro 5.2All versions2.9.2-150200.13.1
python-cryptography SUSE:Linux Enterprise Module for Basesystem 15All versions2.1.4-4.3.1
python-cryptography SUSE:Linux Enterprise Module for Basesystem 15 SP3All versions2.9.2-150200.13.1
python-cryptography SUSE:Linux Enterprise Module for Python 2 15 SP3All versions2.9.2-150200.13.1
python-cffi SUSE:Linux Enterprise Server 12 SP1-LTSSAll versions1.11.2-2.19.2
python-cryptography SUSE:Linux Enterprise Server 12 SP1-LTSSAll versions2.1.4-3.15.5
python-xattr SUSE:Linux Enterprise Server 12 SP1-LTSSAll versions0.7.5-3.2.1
python-cffi SUSE:Linux Enterprise Server 12 SP2-BCLAll versions1.11.2-5.11.1
python-cryptography SUSE:Linux Enterprise Server 12 SP2-BCLAll versions2.1.4-7.28.2
python-xattr SUSE:Linux Enterprise Server 12 SP2-BCLAll versions0.7.5-6.3.2
python-cffi SUSE:Linux Enterprise Server 12 SP2-LTSSAll versions1.11.2-5.11.1
python-cryptography SUSE:Linux Enterprise Server 12 SP2-LTSSAll versions2.1.4-7.28.2
python-xattr SUSE:Linux Enterprise Server 12 SP2-LTSSAll versions0.7.5-6.3.2
python-cffi SUSE:Linux Enterprise Server 12 SP3-BCLAll versions1.11.2-5.11.1
python-cryptography SUSE:Linux Enterprise Server 12 SP3-BCLAll versions2.1.4-7.28.2
python-xattr SUSE:Linux Enterprise Server 12 SP3-BCLAll versions0.7.5-6.3.2
python-cffi SUSE:Linux Enterprise Server 12 SP3-LTSSAll versions1.11.2-5.11.1
python-cryptography SUSE:Linux Enterprise Server 12 SP3-LTSSAll versions2.1.4-7.28.2
python-xattr SUSE:Linux Enterprise Server 12 SP3-LTSSAll versions0.7.5-6.3.2
python-cffi SUSE:Linux Enterprise Server 12 SP4All versions1.11.2-5.11.1
python-cryptography SUSE:Linux Enterprise Server 12 SP4All versions2.1.4-7.28.2
python-xattr SUSE:Linux Enterprise Server 12 SP4All versions0.7.5-6.3.2
python-cffi SUSE:Linux Enterprise Server 12 SP5All versions1.11.2-5.11.1

Products include Canonical Ubuntu Linux, Cryptography Python-Cryptography, Redhat Openstack.

How do I fix CVE-2018-10903?

Upgrade cryptography to 2.3 or later.

Is CVE-2018-10903 being exploited?

There is no known exploitation of CVE-2018-10903 in the wild and no public exploit code.

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2018-10903, GHSA-fcf9-3qw3-gxmj, MGASA-2018-0429, PYSEC-2018-52, RHSA-2018:3600, SUSE-SU-2018:3392-1 and 6 more.

Is CVE-2018-10903 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free