Vulnerability · Published Jan 11, 2024 · Assigned by GitHub_M

CVE-2024-22190Untrusted search path under some conditions on Windows allows arbitrary code execution

High 7.8

In plain English

A high-severity security flaw in GitPython from gitpython-developers. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 25% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.3%top 75.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

GitPython is a python library used to interact with Git repositories. There is an incomplete fix for CVE-2023-40590. On Windows, GitPython uses an untrusted search path if it uses a shell to run `git`, as well as when it runs `bash.exe` to interpret hooks. If either of those features are used on Windows, a malicious `git.exe` or `bash.exe` may be run from an untrusted repository. This issue has been patched in version 3.1.41.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIgitpython3.1.41GHSA-2mqj-m65w-jghx
PyPIgitpython3.1.41PYSEC-2024-4
Ubuntu:24.04:LTSpython-gitno fix listedUBUNTU-CVE-2024-22190
Ubuntu:25.10python-gitno fix listedUBUNTU-CVE-2024-22190
Ubuntu:26.04:LTSpython-gitno fix listedUBUNTU-CVE-2024-22190

Affected products (as reported)

VendorProductVersions
gitpython-developers GitPython < 3.1.41

Weakness: CWE-426 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

References