Improper Input Validation Affecting python-gnupg package, versions [,0.4.4)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Mature
EPSS
1.45% (87th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Input Validation vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-PYTHONGNUPG-73633
  • published30 Jan 2019
  • disclosed24 Jan 2019
  • creditAlexander Kjall and Stig Palmquis

Introduced: 24 Jan 2019

CVE-2019-6690  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

Upgrade python-gnupg to version 0.4.4 or higher.

Overview

python-gnupg is a command-line program which provides support for programmatic access via spawning a separate process to run it and then communicating with that process from your program.

Affected versions of this package are vulnerable to Improper Input Validation. An attacker can inject data through the passphrase property of the gnupg.GPG.encrypt() and gnupg.GPG.decrypt() methods when symmetric encryption is used.

The supplied passphrase is not validated for newlines, and the library passes --passphrase-fd=0 to the gpg executable, which expects the passphrase on the first line of stdin, and the ciphertext to be decrypted or plaintext to be encrypted on subsequent lines.

By supplying a passphrase containing a newline an attacker can control/modify the ciphertext/plaintext being decrypted/encrypted.

CVSS Scores

version 3.1