Critical Remote Code Execution Vulnerability in Python-Git Package

python-git Updated 02 Oct 2025

Summary

06/12/2022
N/A
Yes i
High
8.1

UBUNTU-CVE-2022-24439: All versions of package gitpython are vulnerable to Remote Code Execution (RCE) due to improper user input validation, which makes it possible to inject a maliciously crafted remote URL into the clone command. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The Python-Git package is a Python library used for interacting with Git repositories. It provides a simple interface for executing Git commands and managing repositories programmatically. This package is widely utilized in various applications that require version control functionalities. However, it has been identified that all versions of this package are vulnerable to a critical Remote Code Execution (RCE) vulnerability due to improper user input validation.

Vulnerability Detail

The vulnerability arises from the package's failure to adequately validate user input when constructing commands to clone repositories. This oversight allows an attacker to inject a maliciously crafted remote URL into the clone command, potentially leading to arbitrary code execution on the host system. The implications of this vulnerability are severe, as it can allow attackers to execute arbitrary commands, steal sensitive information, or compromise the integrity of the system.

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 vulnerable functionalities of the Python-Git package until the package is updated. It is advisable to validate any user input that is passed to Git commands manually to prevent potential exploitation.

Conclusion

The Python-Git package has a critical vulnerability that allows for Remote Code Execution due to improper input validation. Users are strongly advised to update to the patched versions provided for their respective Ubuntu distributions to mitigate the risk. Temporary workarounds include avoiding vulnerable functionalities and implementing input validation.

See every vulnerability recorded for python-git →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 8.1, indicating a high severity level.

You can use Vulert, which allows you to monitor and alert for open-source vulnerabilities in your software using just a manifest file like package-lock.json. You can check your application at Vulert Scanner without any signup.

Exploitation of this vulnerability can lead to Remote Code Execution, allowing attackers to execute arbitrary commands on the host system, potentially compromising sensitive data and system integrity.

Yes, patched versions of the Python-Git package are available for various Ubuntu distributions. Users should update to the latest version as specified in the 'how to fix' section.

If immediate updates are not possible, consider implementing input validation for any user inputs that are passed to Git commands to mitigate the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for python-git.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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