{"id":"CVE-2024-22190","published":"2024-01-11T01:23:17Z","modified":"2024-09-03T18:23:46Z","title":"Untrusted search path under some conditions on Windows allows arbitrary code execution","vendor":"gitpython-developers","product":"GitPython","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00316,"percentile":0.25193,"provenance":"source"},"cwes":[{"id":"CWE-426","name":"Untrusted Search Path"}],"references":[{"url":"https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-2mqj-m65w-jghx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/gitpython-developers/GitPython/pull/1792","tags":["x_refsource_MISC"]},{"url":"https://github.com/gitpython-developers/GitPython/commit/ef3192cc414f2fd9978908454f6fd95243784c7f","tags":["x_refsource_MISC"]}],"priority":{"score":10.5,"factors":[{"name":"EPSS percentile","points":5.04},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"gitpython-developers","affectedVersions":[{"vendor":"gitpython-developers","product":"GitPython","versions":["< 3.1.41"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2024-03-25T18:06:43.044544Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"GitPython","vulnerableRanges":["<3.1.41"],"patched":["3.1.41"],"from":["GHSA-2mqj-m65w-jghx","PYSEC-2024-4"],"provenance":"source"}],"summary":{"text":"GitPython, a Python library for interacting with Git repositories, contains an untrusted search path flaw on Windows: when it runs git through a shell or runs bash.exe to interpret hooks, it can pick up a malicious git.exe or bash.exe from an untrusted repository. An attacker can achieve arbitrary code execution by getting a victim to use one of those features on Windows against a malicious repository, which requires local access and user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:58:44Z"},"euvd":{"id":"EUVD-2024-0062","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-gitpython-developers-gitpython-cve-2022-24439","parents":[{"from":"CVE-2023-40590","to":"CVE-2024-22190","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"There is an incomplete fix for CVE-2023-40590.","from":"CVE.org","in":"CVE-2024-22190"},{"kind":"same-code","provenance":"machine","files":["git/cmd.py"],"commits":["https://github.com/gitpython-developers/GitPython/commit/8b75434e2c8a082cdeb4971cc6f0ee2bafec45bc","https://github.com/gitpython-developers/GitPython/commit/ef3192cc414f2fd9978908454f6fd95243784c7f"],"basis":"shared function","functions":["execute"]}]}],"children":[{"from":"CVE-2024-22190","to":"CVE-2026-67322","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["git/util.py"],"commits":["https://github.com/gitpython-developers/GitPython/commit/ef3192cc414f2fd9978908454f6fd95243784c7f","https://github.com/gitpython-developers/GitPython/commit/8ac5a30519b6f4af85398b9b9d7064ff4d452da2"],"basis":"rarely changed file"}]},{"from":"CVE-2024-22190","to":"CVE-2026-73622","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["git/util.py"],"commits":["https://github.com/gitpython-developers/GitPython/commit/ef3192cc414f2fd9978908454f6fd95243784c7f","https://github.com/gitpython-developers/GitPython/commit/8ac5a30519b6f4af85398b9b9d7064ff4d452da2","https://github.com/gitpython-developers/GitPython/commit/863417457a0633db7ea5aed4fd01e0b291a41162"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2023-40267","published":"2023-08-11","fixed":"3.1.32","kev":false},{"cve":"CVE-2023-40590","published":"2023-08-28","fixed":"3.1.33","kev":false},{"cve":"CVE-2023-41040","published":"2023-08-30","fixed":"3.1.37","kev":false,"link":{"from":"CVE-2023-41040","to":"CVE-2024-22190","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:GitPython","fromFixed":"3.1.37","toFixed":"3.1.41","daysApart":134}]}},{"cve":"CVE-2024-22190","published":"2024-01-11","fixed":"3.1.41","kev":false},{"cve":"CVE-2026-42215","published":"2026-05-07","fixed":"3.1.47","kev":false},{"cve":"CVE-2026-42284","published":"2026-05-07","fixed":"3.1.47","kev":false},{"cve":"CVE-2026-44243","published":"2026-05-07","fixed":"3.1.48","kev":false}],"package":"PyPI:GitPython"}}