Critical

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

  • Disclosed: 11.08.2023
  • Updated: 11.10.2026 12:19

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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) gitpython < 3.1.32 3.1.32

References

CVSS score 9.8/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-78
Platform
Python (PyPI)
Package
gitpython
Disclosed
11.08.2023
Updated
11.10.2026 12:19

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2023-137 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-pr76-5cm5-w9cj - CC BY 4.0

Vulnerability history: gitpython

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (37) in the archive
Total entries
37
First → latest
12.2022 09.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 3
  • High 26
  • Medium 8

Disclosures per year

  1. 2022: 1
  2. 2023: 3
  3. 2024: 1
  4. 2025: 0
  5. 2026: 32
Severity:
  1. GitPython vulnerable to remote code execution due to insufficient sanitization of input arguments this entry
    Critical · 9.8 CVE-2023-40267 < 3.1.32 3.1.32
Show more (8) Showing 21 of 29

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.