CVE-2024-22190: Legit · Untrusted search path under some conditions on Windows allows arbitrary code execution
Affects legitSource GCVE Database
Mentioned vulnerabilities
Not known to be exploited · CVSS 7.8 High : upgrade to 1.2.0.post0_8 soon.
Data as of 26 Oct 2026, 19:41 UTC
- Patch
- Available – fixed in 1.2.0.post0_8
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 13 Aug 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade legit to 1.2.0.post0_8.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewlegitpkg:brew/legitOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in Legit version 1.2.0.post0_8. Users and developers should upgrade to this version to fully address the vulnerability. Until patched, avoid using shell=True when running git commands with Legit on Windows to reduce risk. There is no straightforward mitigation for the bash.exe hook script issue other than applying the official fix. Running Legit from a trusted directory does not mitigate the risk. Follow the vendor advisory for the official patch and remediation guidance.
Description
CVE-2024-22190 is a vulnerability in the Legit (GitPython-based) library on Windows that allows arbitrary code execution via untrusted search paths. It arises from an incomplete fix for CVE-2023-40590, where GitPython may run malicious git.exe or bash.exe executables located in the current repository directory when using shell execution or running hook scripts. This affects applications that run git commands through a shell or run hooks interpreted by bash.exe without properly restricting the executable search path.
References
- github.com/gitpython-developers/GitPython/security/advisories/GHSA-2mqj-m65w-jghx (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2024-22190 (opens in a new tab)
- github.com/gitpython-developers/GitPython/pull/1792 (opens in a new tab)
- github.com/gitpython-developers/GitPython/commit/ef3192cc414f2fd9978908454f6fd95243784c7f (opens in a new tab)
- github.com/gitpython-developers/GitPython (opens in a new tab)
- github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2024-4.yaml (opens in a new tab)