CVE-2014-1928: python-gnupg shell_quote improper character escaping

CVE-2014-1928 · Severity: low · CVSS 3.1 · Published 2014-10-25

python-gnupg is a Python library for interacting with GnuPG encryption tools. A flaw in its shell_quote function fails to properly escape special shell characters, allowing attackers to inject arbitrary shell commands and execute code when the library processes untrusted input.

Technologies: python-gnupg (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2014-1928 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2014-1928 being exploited in the wild.
How severe is CVE-2014-1928?
Low severity, with a CVSS score of 3.1, published 25 October 2014.
Which products and versions are affected?
python-gnupg (PyPI) ECOSYSTEM:introduced=0,fixed=0.3.6, ECOSYSTEM:introduced=0.3.5,fixed=0.3.6.
Is there a fix for CVE-2014-1928?
Yes. python-gnupg (PyPI): upgrade to 0.3.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2014-1928 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2014-1928?
Check whether you run python-gnupg (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • python-gnupg (PyPI): upgrade to 0.3.6 or later
    pip install "python-gnupg>=0.3.6"

Technical details

The shell_quote function in python-gnupg 0.3.5 does not properly sanitize shell metacharacters, particularly backslash characters, allowing command injection attacks. This is a context-dependent vulnerability where attackers can craft malicious input containing shell metacharacters to form multi-command sequences. The vulnerability exists in an incomplete fix for CVE-2013-7323. Attack requires passing untrusted input through the vulnerable function, but does not require authentication or user interaction. An attacker can execute arbitrary shell commands with the privileges of the process running python-gnupg. The vulnerability was patched in version 0.3.6.

Affected products

  • python-gnupg python-gnupg 0.3.5

Identifiers

  • CVE-2014-1928
  • GHSA-2jc8-4r6g-282j
  • PYSEC-2014-91

Timeline

  • 2014-01: disclosed: Vulnerability disclosed via oss-sec mailing list
  • 2014: patched: Fixed in version 0.3.6
  • 2018-11-06: advisory: GitHub advisory GHSA-2jc8-4r6g-282j published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.