CVE-2023-40267: OS Command Injection
GitPython before 3.1.32 does not block insecure non-multi options in clone and clonefrom, making it vulnerable to Remote Code Execution (RCE) due to improper user input validation, which makes it possible to inject a maliciously crafted remote URL into the clone command. Exploiting this vulnerability is possible because the library makes external calls to git without sufficient sanitization of input arguments. NOTE: this issue exists because of an incomplete fix for CVE-2022-24439.
Other sources
GitPython before 3.1.32 does not block insecure non-multi options in clone and clonefrom. NOTE: this issue exists because of an incomplete fix for CVE-2022-24439.
— Ubuntu
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/python-gitto a version that resolves this vulnerability.Fixed in 2.1.11-1+deb10u2Fixed in 3.1.30-1+deb12u2Fixed in 3.1.37-3 - Upgrade
Upgrade
ubuntu/python-gitto a version that resolves this vulnerability.Fixed in 2.1.8-1ubuntu0.1~ - Upgrade
Upgrade
ubuntu/python-gitto a version that resolves this vulnerability.Fixed in 3.0.7-1ubuntu0.1~ - Upgrade
Upgrade
ubuntu/python-gitto a version that resolves this vulnerability.Fixed in 3.1.24-1ubuntu0.1~ - Upgrade
Upgrade
ubuntu/python-gitto a version that resolves this vulnerability.Fixed in 3.1.30-1ubuntu0.23.04.1 - Upgrade
Upgrade
ubuntu/python-gitto a version that resolves this vulnerability.Fixed in 0.3.2~ - Upgrade
Upgrade
ubuntu/python-gitto a version that resolves this vulnerability.Fixed in 1.0.1+ - Upgrade
Upgrade
pip/GitPythonto a version that resolves this vulnerability.Fixed in 3.1.32 - Upgrade
Upgrade
redhat/git-pythonto a version that resolves this vulnerability.Fixed in 3.1.32 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.1.32
Event History
Frequently Asked Questions
What is the severity of CVE-2023-40267?
CVE-2023-40267 has a critical severity level due to the potential for Remote Code Execution caused by improper user input validation.
How do I fix CVE-2023-40267?
To fix CVE-2023-40267, upgrade GitPython to version 3.1.32 or a later patched version.
What versions of GitPython are affected by CVE-2023-40267?
GitPython versions prior to 3.1.32 are affected by CVE-2023-40267.
Can CVE-2023-40267 be exploited remotely?
Yes, CVE-2023-40267 can be exploited remotely through crafted malicious URLs during the clone process.
What is the impact of exploiting CVE-2023-40267?
Exploiting CVE-2023-40267 can lead to Remote Code Execution, allowing attackers to execute arbitrary commands on a user's system.