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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | gitpython | 3.1.41 | GHSA-2mqj-m65w-jghx |
| PyPI | gitpython | 3.1.41 | PYSEC-2024-4 |
| Ubuntu:24.04:LTS | python-git | no fix listed | UBUNTU-CVE-2024-22190 |
| Ubuntu:25.10 | python-git | no fix listed | UBUNTU-CVE-2024-22190 |
| Ubuntu:26.04:LTS | python-git | no fix listed | UBUNTU-CVE-2024-22190 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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