Critical Remote Command Execution Vulnerability in python-git Package

python-git Updated 03 Oct 2025

Summary

22/03/2023
N/A
Yes i
Unrated
Not published

USN-5968-1: python-git vulnerability. Affects python-git versions < 0.3.2~RC1-3ubuntu0.1~esm1. Fixed in 0.3.2~RC1-3ubuntu0.1~esm1. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The python-git package is a Python library that provides an interface to Git repositories, allowing users to interact with Git repositories programmatically. It is widely used in various applications for version control and source code management. The package is essential for developers who need to automate Git operations within their Python applications. However, a recently discovered vulnerability exposes it to potential remote command execution attacks, making it crucial for users to address this issue promptly.

Vulnerability Detail

It was discovered that GitPython did not properly sanitize user inputs for remote URLs in the clone command. By injecting a maliciously crafted remote URL, an attacker could possibly use this issue to execute arbitrary commands on the host. This vulnerability, identified as CVE-2022-24439, poses a significant risk as it allows unauthorized execution of commands, potentially leading to data breaches or system compromise.

How To Fix

Minimum fixed version

0.3.2~RC1-3ubuntu0.1~esm1

This is the first release that contains the fix.

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

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 clone command with untrusted remote URLs until the package is updated. It is advisable to validate and sanitize any user inputs that are passed to the clone command to mitigate the risk of exploitation.

Conclusion

The python-git package has a critical vulnerability that could allow remote command execution through improperly sanitized user inputs. Users are strongly advised to update to the patched version to secure their systems. Additionally, utilizing tools like Vulert can help monitor and manage vulnerabilities in open-source software effectively.

See every vulnerability recorded for python-git →

Share this vulnerability

FAQ

The vulnerability allows for remote command execution due to improper sanitization of user inputs for remote URLs in the clone command.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application using the Vulert playground without any signup.

If exploited, this vulnerability could allow attackers to execute arbitrary commands on the host system, leading to data breaches or complete system compromise.

Yes, a patched version of the python-git package is available. Users should update to the latest version to mitigate the vulnerability.

As a workaround, avoid using the clone command with untrusted remote URLs and validate any user inputs to minimize the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for python-git.

How To Fix

Minimum fixed version

0.3.2~RC1-3ubuntu0.1~esm1

This is the first release that contains the fix.

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

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