Skip to main content
VulnerabilityPublished Updated

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

Affects legitSource GCVE Database

0

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

CVSS 3.1 base score
7.8High
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 13 Aug 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Homebrewlegitpkg:brew/legitOther threatsAffected
  • >=0.1.0 <1.2.0.post0_8
Fixed in
  • 1.2.0.post0_8

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

Community reviews

Loading reviews…