Critical Code Execution Vulnerability in python-dbusmock

python-dbusmock Updated 02 Oct 2025

Summary

22/04/2019
N/A
Yes i
Unrated
Not published

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 ↓

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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for python-dbusmock.

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 →

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