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

- Severity: High 7.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 26% of CVEs (2026-12-01)
- Published: 2024-01-10T15:46:00.000Z
- Modified: 2026-09-10T03:50:04.639Z
- Also known as: GHSA-2mqj-m65w-jghx, PYSEC-2024-4
- Weaknesses: CWE-426
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- gitpython-developers GitPython: < 3.1.41
- gitpython (PyPI): before 3.1.41; before ef3192cc414f2fd9978908454f6fd95243784c7f
- gitpython_project gitpython: before 3.1.41

## Every score

- GitHub_M: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-2mqj-m65w-jghx> (advisory, vendor-advisory, web)
- <https://github.com/gitpython-developers/GitPython/pull/1792> (advisory, patch, vendor-advisory, web)
- <https://github.com/gitpython-developers/GitPython/commit/ef3192cc414f2fd9978908454f6fd95243784c7f> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-22190> (advisory)
- <https://github.com/gitpython-developers/GitPython> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2024-4.yaml> (web)

## Sources

- CVE List: [CVE-2024-22190](https://www.cve.org/CVERecord?id=CVE-2024-22190), CVE Terms of Use, modified 2024-09-03
- GitHub Advisory Database: [GHSA-2mqj-m65w-jghx](https://github.com/advisories/GHSA-2mqj-m65w-jghx), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-22190](https://nvd.nist.gov/vuln/detail/CVE-2024-22190), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-4](https://osv.dev/vulnerability/PYSEC-2024-4), CC-BY-4.0, modified 2024-01-18

---

Page: https://cve.day/CVE-2024-22190 · Whole record: https://cve.day/CVE-2024-22190.json · Rebuilt by cve.day 2026-11-25T22:58:36.022Z
