CVE-2023-40267: OS Command Injection

Published Aug 11, 2023
·
Updated

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

10 affected componentsFixes available
debian/python-git<=2.1.11-1, <=3.1.14-1
2.1.11-1+deb10u23.1.30-1+deb12u23.1.37-3
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
Gitpython Project Gitpython Python<3.1.32
redhat/git-python<3.1.32
3.1.32

Event History

Aug 11, 2023
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via NVD·07:15 AM
RemedyDescriptionSeverityAffected Software
Advisory Published
via GitHub·09:30 AM
Data Sourced
via Red Hat·05:03 PM
DescriptionSeverityAffected Software
Jan 12, 2024
Data Sourced
via Launchpad·12:24 AM
Description

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

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.

2

How do I fix CVE-2023-40267?

To fix CVE-2023-40267, upgrade GitPython to version 3.1.32 or a later patched version.

3

What versions of GitPython are affected by CVE-2023-40267?

GitPython versions prior to 3.1.32 are affected by CVE-2023-40267.

4

Can CVE-2023-40267 be exploited remotely?

Yes, CVE-2023-40267 can be exploited remotely through crafted malicious URLs during the clone process.

5

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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203