CVE-2023-40590
Last modified
CVE-2023-40590 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. GitPython is a python library used to interact with Git repositories. When resolving a program, Python/Windows look for the current working directory, and after that the PATH environment. EPSS estimates a 0.46% chance of exploitation in the next 30 days.
Description
GitPython is a python library used to interact with Git repositories. When resolving a program, Python/Windows look for the current working directory, and after that the PATH environment. GitPython defaults to use the `git` command, if a user runs GitPython from a repo has a `git.exe` or `git` executable, that program will be run instead of the one in the user's `PATH`. This is more of a problem on how Python interacts with Windows systems, Linux and any other OS aren't affected by this. But probably people using GitPython usually run it from the CWD of a repo. An attacker can trick a user to download a repository with a malicious `git` executable, if the user runs/imports GitPython from that directory, it allows the attacker to run any arbitrary commands. There is no fix currently available for windows users, however there are a few mitigations. 1: Default to an absolute path for the git program on Windows, like `C:\\Program Files\\Git\\cmd\\git.EXE` (default git path installation). 2: Require users to set the `GIT_PYTHON_GIT_EXECUTABLE` environment variable on Windows systems. 3: Make this problem prominent in the documentation and advise users to never run GitPython from an untrusted repo, or set the `GIT_PYTHON_GIT_EXECUTABLE` env var to an absolute path. 4: Resolve the executable manually by only looking into the `PATH` environment variable.
Metrics
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Gitpython Project | Gitpython | <= 3.1.32 |
References
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-wfm5-v35h-vwf4Exploit, Mitigation, Vendor Advisory
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-wfm5-v35h-vwf4Exploit, Mitigation, Vendor Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2023-40590?
How severe is CVE-2023-40590?
How do I fix CVE-2023-40590?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2023
- CVE-2023-40585ironic-image is a container image to run OpenStack Ironic as…7.5
- CVE-2023-40586OWASP Coraza WAF is a golang modsecurity compatible web appl…7.5
- CVE-2023-40587Pyramid is an open source Python web framework. A path trave…5.3
- CVE-2023-40588Discourse is an open-source discussion platform. Prior to ve…6.5
- CVE-2023-40589FreeRDP is a free implementation of the Remote Desktop Proto…7.5
- CVE-2023-4059The Profile Builder WordPress plugin before 3.9.8 lacks auth…4.3
- CVE-2023-40591go-ethereum (geth) is a golang execution layer implementatio…7.5
- CVE-2023-40592In Splunk Enterprise versions below 9.1.1, 9.0.6, and 8.2.12…6.1
- CVE-2023-40593In Splunk Enterprise versions lower than 9.0.6 and 8.2.12, a…7.5
- CVE-2023-40594In Splunk Enterprise versions lower than 8.2.12, 9.0.6, and …7.5
- CVE-2023-40595In Splunk Enterprise versions lower than 8.2.12, 9.0.6, and …8.8
- CVE-2023-40596In Splunk Enterprise versions earlier than 8.2.12, 9.0.6, an…8.8
Are you affected by CVE-2023-40590?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
