CVE-2019-6690: Python gnupg Improper Input Validation Python-gnupg Vulnerability

HIGH
Advisory Identifier: GHSA-2fch-jvg5-crf6
CVSS 7.5
CWE-20
Published
Advisory Summary

CVE-2019-6690 is a HIGH (CVSS 7.5) improper input validation python-gnupg vulnerability (CWE-20: Improper Input Validation) affecting Python gnupg libraries in the PyPI ecosystem. The issue involves improper input validation python-gnupg. Remediation is available by upgrading affected packages to version 0.4.4.

CVE-2019-6690 at a Glance

CVE Identifier CVE-2019-6690
GHSA Identifier GHSA-2fch-jvg5-crf6
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-20: Improper Input Validation
Affected Product Python gnupg
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2019-6690

To remediate this vulnerability, upgrade all affected Python gnupg dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

python-gnupg fixed: 0.4.4
pip install python-gnupg>=0.4.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show python-gnupg

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2019-6690, inspect your installed packages using pip:

pip show python-gnupg

Analyze the terminal output to locate any version of Python gnupg in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.4), your application is affected.

Note: The pip show python-gnupg command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Python gnupg, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

python-gnupg 0.4.3 allows context-dependent attackers to trick gnupg to decrypt other ciphertext than intended. To perform the attack, the passphrase to gnupg must be controlled by the adversary and the ciphertext should be trusted. Related to a "CWE-20: Improper Input Validation" issue affecting the affect functionality component.

CVE-2019-6690 Affected Python gnupg Versions

1 component(s)
Fixed Versions:
0.4.4
Product / Package Ecosystem Affected Versions Fixed Version
python-gnupg
PyPI
< 0.4.4
0.4.4

References

NVD — CVE-2019-6690 NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-6690
blog.hackeriet.no/cve-2019-6690-pytho... WEB
https://blog.hackeriet.no/cve-2019-6690-python-gnupg-vulnerability
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-2fch-jvg5-crf6
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2019/02/msg00021.html
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2021/12/msg00027.html
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3WMV6XNPPL3VB3RQRFFOBCJ3AGWC4K47
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W6KYZMN2PWXY4ENZVJUVTGFBVYEVY7II
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/X4VFRUG56542LTYK4444TPJBGR57MT25
pypi.org/project/python-gnup... WEB
https://pypi.org/project/python-gnupg/#history
seclists.org/bugtraq/2019/jan/41 WEB
https://seclists.org/bugtraq/2019/Jan/41
usn.ubuntu.com/3964-1 WEB
https://usn.ubuntu.com/3964-1
Python gnupg Security Information SECURITY
https://web.archive.org/web/20200227091727/http://www.securityfocus.com/bid/106756
Python gnupg Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2019-02/msg00008.html
Python gnupg Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2019-02/msg00058.html
Python gnupg Security Information SECURITY
http://packetstormsecurity.com/files/151341/Python-GnuPG-0.4.3-Improper-Input-Validation.html

Frequently Asked Questions

What is CVE-2019-6690?
CVE-2019-6690 is a security vulnerability in Python gnupg involving Improper Input Validation python-gnupg under CWE-20: Improper Input Validation.
Which Python gnupg versions are affected?
Affected versions include releases prior to 0.4.4 across affected packages: python-gnupg.
What version fixes CVE-2019-6690?
Upgrading to 0.4.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is python-gnupg affected?
Yes, python-gnupg is affected in releases prior to 0.4.4. Upgrade your dependency to 0.4.4 or later.
What is the CVSS score of CVE-2019-6690?
CVE-2019-6690 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2019-6690?
CVE-2019-6690 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check PyPI dependencies for CVE-2019-6690?
Run the dependency tree command: 'pip show python-gnupg'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2fch-jvg5-crf6",
  "modified" : "2022-09-17T00:03:45Z",
  "published" : "2019-03-25T16:17:53Z",
  "aliases" : [ "CVE-2019-6690" ],
  "summary" : "Improper Input Validation python-gnupg",
  "details" : "python-gnupg 0.4.3 allows context-dependent attackers to trick gnupg to decrypt other ciphertext than intended. To perform the attack, the passphrase to gnupg must be controlled by the adversary and the ciphertext should be trusted. Related to a \"CWE-20: Improper Input Validation\" issue affecting the affect functionality component.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "python-gnupg"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-6690"
  }, {
    "type" : "WEB",
    "url" : "https://blog.hackeriet.no/cve-2019-6690-python-gnupg-vulnerability"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-2fch-jvg5-crf6"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2019/02/msg00021.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2021/12/msg00027.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3WMV6XNPPL3VB3RQRFFOBCJ3AGWC4K47"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W6KYZMN2PWXY4ENZVJUVTGFBVYEVY7II"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/X4VFRUG56542LTYK4444TPJBGR57MT25"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/python-gnupg/#history"
  }, {
    "type" : "WEB",
    "url" : "https://seclists.org/bugtraq/2019/Jan/41"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/3964-1"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200227091727/http://www.securityfocus.com/bid/106756"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2019-02/msg00008.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2019-02/msg00058.html"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/151341/Python-GnuPG-0.4.3-Improper-Input-Validation.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:41:57Z",
    "nvd_published_at" : "2019-03-21T16:01:00Z"
  }
}