Bug 1670364 (CVE-2019-6690) - CVE-2019-6690 python-gnupg: improper input validation in gnupg.GPG.encrypt() and gnupg.GPG.decrypt()
Summary: CVE-2019-6690 python-gnupg: improper input validation in gnupg.GPG.encrypt() ...
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2019-6690
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1670366 1670367 1670368 1686551
Blocks: 1670381
TreeView+ depends on / blocked
 
Reported: 2019-01-29 12:03 UTC by msiddiqu
Modified: 2021-02-16 22:28 UTC (History)
10 users (show)

Fixed In Version: python-gnupg 0.4.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-20 11:59:13 UTC
Embargoed:


Attachments (Terms of Use)

Description msiddiqu 2019-01-29 12:03:31 UTC
From the source : 

We discovered a way to 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.

Vulnerable in:  python-gnupg 0.4.3 and maybe earlier versions.
Mitigation   :  Users should upgrade to python-gnupg 0.4.4

Upstream     : 

https://github.com/stigtsp/CVE-2019-6690-python-gnupg-vulnerability

https://github.com/vsajip/python-gnupg/commit/39eca266dd837e2ad89c94eb17b7a6f50b25e7cf#diff-88b99bb28683bd5b7e3a204826ead112

https://github.com/vsajip/python-gnupg/commit/3003b654ca1c29b0510a54b9848571b3ad57df19#diff-88b99bb28683bd5b7e3a204826ead112

References   :

https://blog.hackeriet.no/cve-2019-6690-python-gnupg-vulnerability/
https://ctftime.org/task/7458

Comment 1 msiddiqu 2019-01-29 12:04:23 UTC
Created python-gnupg tracking bugs for this issue:

Affects: epel-6 [bug 1670367]
Affects: epel-7 [bug 1670368]
Affects: fedora-all [bug 1670366]

Comment 3 Riccardo Schirone 2019-03-07 16:25:47 UTC
Mitigation:

Filter out newlines from passphrases before passing them to python-gnupg.

Comment 8 Richard Maciel Costa 2019-04-25 03:48:09 UTC
Statement:

The issue affects the versions of python-gnupg shipped with Red Hat Update Infrastructure 3, however the vulnerable functions are never used by the product.

The issue affects the versions of python-gnupg shipped with Red Hat Satellite 6, however the vulnerable functions are never used by the product.

Comment 9 Product Security DevOps Team 2021-01-20 11:59:13 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2019-6690


Note You need to log in before you can comment on or make changes to this bug.