Critical Vulnerability in python-gnupg: Shell Command Injection Risk

python-gnupg Updated 02 Oct 2025

Summary

25/10/2014
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2014-1928: The shell_quote function in python-gnupg 0.3.5 does not properly escape characters, which allows context-dependent attackers to execute arbitrary code via shell metacharacters in unspecified vectors, as demonstrated usin... Affects python-gnupg versions < 0.3.6-1. Fixed in 0.3.6-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

python-gnupg is a Python wrapper for GnuPG, allowing users to manage encryption and signing of data. It provides a simple interface for cryptographic operations, making it a popular choice for developers needing secure data handling. However, a vulnerability in version 0.3.5 compromises its security by failing to properly escape shell metacharacters, leading to potential command injection attacks.

Vulnerability Detail

The vulnerability, identified as CVE-2014-1928, arises from the shell_quote function in python-gnupg version 0.3.5, which does not adequately escape characters. This oversight allows attackers to execute arbitrary code through shell metacharacters, particularly by using backslash characters to create multi-command sequences. This issue is distinct from CVE-2014-1927 and stems from an incomplete fix for CVE-2013-7323. The implications of this vulnerability are severe, as it can lead to unauthorized code execution in the context of the application using the library.

How To Fix

Minimum fixed version

0.3.6-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-gnupg

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the vulnerable version of python-gnupg (0.3.5) and consider implementing input validation to sanitize any user inputs that may be passed to shell commands. This can help mitigate the risk of command injection until the package is updated.

Conclusion

The vulnerability in python-gnupg poses a significant risk due to its potential for command injection. Users are strongly advised to update to the patched version to safeguard their applications. Implementing input validation can serve as a temporary measure to mitigate risks until the update is applied.

See every vulnerability recorded for python-gnupg →

Share this vulnerability

FAQ

CVE-2014-1928 is a vulnerability in python-gnupg that allows attackers to execute arbitrary code due to improper escaping of shell metacharacters.

The vulnerability affects python-gnupg version 0.3.5 and earlier. Versions 0.3.6-1 and later contain the fix.

You can use Vulert, which monitors open-source vulnerabilities in your software. By uploading your manifest file like package-lock.json, you can check for vulnerabilities without needing to install anything.

Failing to address this vulnerability may allow attackers to execute arbitrary commands on the system, leading to data breaches, unauthorized access, or system compromise.

Yes, you can implement input validation to sanitize user inputs that may be passed to shell commands, reducing the risk of command injection until the package is updated.

Related vulnerabilities

Recent vulnerabilities recorded for python-gnupg.

How To Fix

Minimum fixed version

0.3.6-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-gnupg

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback