CWE
78 20
Advisory Published
Advisory Published
Updated

CVE-2023-40267: OS Command Injection

First published: Fri Aug 11 2023(Updated: )

GitPython before 3.1.32 does not block insecure non-multi options in `clone` and `clone_from`, 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.

Credit: cve@mitre.org cve@mitre.org cve@mitre.org

Affected SoftwareAffected VersionHow to fix
debian/python-git<=2.1.11-1<=3.1.14-1
2.1.11-1+deb10u2
3.1.30-1+deb12u2
3.1.37-3
redhat/git-python<3.1.32
3.1.32
ubuntu/python-git<2.1.8-1ubuntu0.1~
2.1.8-1ubuntu0.1~
ubuntu/python-git<3.0.7-1ubuntu0.1~
3.0.7-1ubuntu0.1~
ubuntu/python-git<3.1.24-1ubuntu0.1~
3.1.24-1ubuntu0.1~
ubuntu/python-git<3.1.30-1ubuntu0.23.04.1
3.1.30-1ubuntu0.23.04.1
ubuntu/python-git<0.3.2~
0.3.2~
ubuntu/python-git<1.0.1+
1.0.1+
pip/GitPython<3.1.32
3.1.32
Python 3 Bind<3.1.32

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Parent vulnerabilities

(Appears in the following advisories)

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203