GitHub Advisoryadvisory · PyPI

GHSA-pr76-5cm5-w9cj GitPython vulnerable to remote code execution due to insufficient sanitization of input arguments

CRITICAL Published 2023-08-11 Modified 2025-11-04 Official page ↗
Aliases
CVE-2023-40267
Ecosystem
PyPI
Packages
GitPython
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-78
Reviewed
2023-08-11

Affected packages

• PyPI GitPython: < 3.1.32 → fixed in 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.

Related

Alias · CVE (1)

  • CVE-2023-40267 GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. vulnerability

Weakness · CWE (1)

  • CWE-78 Improper Neutralization of Special Elements used in an OS Command weakness

References