Critical Code Execution Vulnerability in python-dbusmock
Summary
DEBIAN-CVE-2015-1326: python-dbusmock before version 0.15.1 AddTemplate() D-Bus method call or DBusTestCase.spawn_server_template() method could be tricked into executing malicious code if an attacker supplies a .pyc file. Affects python-dbusmock versions < 0.15.1-1. Fixed in 0.15.1-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
python-dbusmock is a Python library designed for mocking D-Bus services in tests. It provides functionalities to simulate D-Bus method calls and server templates, making it easier for developers to test applications that rely on D-Bus communication. However, prior to version 0.15.1, it contains a significant vulnerability that allows for potential code execution through malicious inputs.
Vulnerability Detail
The vulnerability arises from the AddTemplate() D-Bus method call and the DBusTestCase.spawn_server_template() method, which can be exploited by an attacker supplying a crafted .pyc file. This could lead to the execution of arbitrary code, posing a severe security risk to applications using this library. The flaw is present in all versions before 0.15.1, making it critical for users to address this issue promptly.
How To Fix
Minimum fixed version
0.15.1-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade python-dbusmock
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary measure, users can avoid using the vulnerable methods AddTemplate() and spawn_server_template() until the package is updated. Additionally, ensure that untrusted inputs are not processed by the application to mitigate the risk of exploitation.
Conclusion
The python-dbusmock library has a critical vulnerability that allows for code execution through malicious inputs. Users are strongly advised to update to version 0.15.1-1 or later to mitigate this risk. Temporary workarounds are available, but the best course of action is to apply the patch as soon as possible.
See every vulnerability recorded for python-dbusmock →
FAQ
python-dbusmock is a library for mocking D-Bus services in Python applications, facilitating easier testing of D-Bus interactions.
The vulnerability allows for arbitrary code execution through malicious .pyc files supplied to specific methods in the library.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If immediate updates are not possible, refrain from using the vulnerable methods and ensure that untrusted inputs are not processed.
For more information on vulnerabilities and real-time monitoring, you can visit Vulert at https://vulert.com, which uses manifest files to track open-source vulnerabilities.
References
Related vulnerabilities
Recent vulnerabilities recorded for python-dbusmock.