Skip to content

GitPython vulnerable to remote code execution due to insufficient sanitization of input arguments

Critical severity GitHub Reviewed Published Aug 11, 2023 to the GitHub Advisory Database • Updated Nov 10, 2023

Package

pip GitPython (pip)

Affected versions

< 3.1.32

Patched versions

3.1.32

Description

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.

References

Published by the National Vulnerability Database Aug 11, 2023
Published to the GitHub Advisory Database Aug 11, 2023
Reviewed Aug 11, 2023
Last updated Nov 10, 2023

Severity

Critical
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2023-40267

GHSA ID

GHSA-pr76-5cm5-w9cj
Checking history
See something to contribute? Suggest improvements for this vulnerability.