Arbitrary Command Execution Vulnerability in python-gnupg Package
Summary
DEBIAN-CVE-2013-7323: python-gnupg before 0.3.5 allows context-dependent attackers to execute arbitrary commands via shell metacharacters in unspecified vectors. Affects python-gnupg versions < 0.3.6-1. Fixed in 0.3.6-1. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The python-gnupg package is a Python wrapper for GnuPG, allowing users to manage encryption and signing of data using GnuPG. It provides a simple interface for cryptographic operations, making it a popular choice for developers needing secure data handling in their applications. However, prior to version 0.3.5, the package is susceptible to a vulnerability that allows attackers to execute arbitrary commands through shell metacharacters in unspecified vectors.
Vulnerability Detail
The vulnerability identified as DEBIAN-CVE-2013-7323 affects python-gnupg versions before 0.3.5. It allows context-dependent attackers to execute arbitrary commands by exploiting shell metacharacters. This can lead to unauthorized access, data manipulation, or system compromise, depending on the privileges of the user running the vulnerable application. The issue arises from insufficient input validation, allowing malicious input to be interpreted as commands by the shell.
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 measure, users can sanitize inputs to prevent shell metacharacters from being executed. This can be done by validating and escaping user inputs before processing them in the application. However, the best approach is to update to the patched version of the package.
Conclusion
The python-gnupg package has a critical vulnerability that allows arbitrary command execution in versions prior to 0.3.5. Users are strongly advised to update to version 0.3.6-1 or later to mitigate this risk. Additionally, employing input validation can serve as a temporary measure until the update is applied.
See every vulnerability recorded for python-gnupg →
FAQ
The vulnerability allows attackers to execute arbitrary commands, potentially leading to unauthorized access or system compromise.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Check your application against the vulnerability using the Vulert playground at Vulert Scanner.
All versions of python-gnupg before 0.3.5 are affected by this vulnerability.
Yes, the vulnerability is fixed in version 0.3.6-1 of the python-gnupg package.
If an immediate update is not possible, ensure to sanitize user inputs to prevent the execution of shell metacharacters as a temporary workaround.
References
Related vulnerabilities
Recent vulnerabilities recorded for python-gnupg.