# CVE-2019-6690: Improper Input Validation python-gnupg

> Attackers can trick the library into decrypting unintended ciphertext if they control the passphrase, leading to unauthorized data access.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Mar 2019
- **Updated:** 4 Aug 2024
- **Also known as:** DEBIAN-CVE-2019-6690, DLA-1675-1, GHSA-2fch-jvg5-crf6, GHSA-qh62-ch95-63wh, MGASA-2019-0105, PYSEC-2019-115, UBUNTU-CVE-2019-6690, openSUSE-SU-2019:0143-1, openSUSE-SU-2019:0239-1

## What is CVE-2019-6690?

CVE-2019-6690 is a high-severity vulnerability in Canonical Ubuntu Linux, published on 17 Mar 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2019-6690?

5 open source packages ship an affected version, including python-gnupg. It affects 5 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `python-gnupg` | PyPI | All versions | 0.4.4 |
| `python-gnupg` | PyPI | All versions | 0.4.4 |
| `python-gnupg` | PyPI | All versions | 0.4.4 |
| `python-gnupg` | PyPI | All versions | 0.4.4 |
| `python-gnupg` | PyPI | All versions | 0.4.4 |
| `python-python-gnupg` | SUSE:Package Hub 15 | All versions | 0.4.4-bp150.2.3.1 |

Products: Canonical Ubuntu Linux, Debian Debian Linux, Opensuse Leap, Python Python-Gnupg, Suse Backports.

## How do I fix CVE-2019-6690?

Upgrade python-gnupg to 0.4.4 or later.

## Is CVE-2019-6690 being exploited?

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

Public exploit code:

- It is a simple PoC of Improper Input Validation in python-gnupg 0.4.3 (CVE-2019-6690). (github_poc): https://github.com/brianwrf/CVE-2019-6690
- https://github.com/stigtsp/CVE-2019-6690-python-gnupg-vulnerability (github_poc): https://github.com/stigtsp/CVE-2019-6690-python-gnupg-vulnerability

## Other vulnerabilities in Canonical Ubuntu Linux

- [CVE-2020-11651](https://insights.sbomify.com/CVE-2020-11651/): SaltStack Salt Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2020-7247](https://insights.sbomify.com/CVE-2020-7247/): OpenSMTPD Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2019-16928](https://insights.sbomify.com/CVE-2019-16928/): Exim Out-of-bounds Write (critical 9.8, exploited in the wild)
- [CVE-2018-6789](https://insights.sbomify.com/CVE-2018-6789/): Exim Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2015-2590](https://insights.sbomify.com/CVE-2015-2590/): Oracle Java SE and Java SE Embedded Remote Code Execution (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-6690 and fix it if it is affected.

What it is: CVE-2019-6690 is a high-severity vulnerability in Canonical Ubuntu Linux, published on 17 Mar 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2019-6690 in the wild and no public exploit code.

Affected packages and fixed versions:
- python-gnupg (PyPI): affected all versions; fixed in 0.4.4
- python-gnupg (PyPI): affected all versions; fixed in 0.4.4
- python-gnupg (PyPI): affected all versions; fixed in 0.4.4
- python-gnupg (PyPI): affected all versions; fixed in 0.4.4
- python-gnupg (PyPI): affected all versions; fixed in 0.4.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-6690/ (Markdown: https://insights.sbomify.com/CVE-2019-6690/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-6690
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-6690
- OSV: https://osv.dev/vulnerability/CVE-2019-6690

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-6690/
Summaries are generated and may contain mistakes; the official description above is the record.
