Advisory

GHSA-pr76-5cm5-w9cj

Also known as: CVE-2023-40267, PYSEC-2023-137

Summary

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

Details

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2023-08-11 09:30 UTC
Modified
2025-11-04 17:01 UTC

Affected packages and fixes

gitpython

PyPI · All systems

Affected

  • introduced 0, fixed 3.1.32 (ecosystem)

Fixed versions

3.1.32

Fix

  • Fixed version 3.1.32
    pip install --upgrade gitpython==3.1.32

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences