CVE-2026-73623

GitPython before 3.1.54 Remote Code Execution via --template

Published Aug 13, 2026 CVSS 4.0 · 7.7 High EPSS < 1% KEV · Not listed
Description
GitPython before 3.1.54 contains an incomplete denylist in unsafe_git_clone_options that omits --template, allowing attackers to achieve arbitrary command execution during clone operations. Attackers can supply --template pointing to a directory containing malicious post-checkout hooks that execute when git clones the repository.

Analysis

AI-generated

Technical impact

GitPython before 3.1.54 contains an incomplete denylist for unsafe Git clone options that omits the --template flag, allowing an attacker to supply a directory containing malicious post‑checkout hooks. During a repository clone, the hooks execute, leading to arbitrary command execution on the host. This flaw is a classic example of command injection, as reflected by the associated CWE‑78.

Affected Systems

The vulnerability affects all installations of the GitPython library prior to version 3.1.54, as distributed by the GitPython developers. Users must verify the installed version and upgrade if they are running a vulnerable release.

Risk and Exploitability

With a CVSS score of 7.7, the exploitation risk is high. The EPSS score is not available, and the vulnerability is not listed in CISA’s KEV catalog, suggesting that broad ecosystem exploitation has not yet been documented. Attackers would need the ability to execute a git clone command with a controllable --template parameter, which could be achieved by hosting a malicious repository or compromising a system that performs cloning from untrusted sources. The potential impact is full remote code execution on the target system.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GitPython to version 3.1.54 or later, which removes the insecure --template handling.
  • If an upgrade cannot be performed immediately, enforce that any --template argument used in a git clone points only to a trusted directory or reject the argument entirely.
  • Modify application code that constructs clone options to apply a strict denylist and validate all arguments against untrusted input to eliminate the possibility of unsafe options being supplied.

Generated by OpenCVE AI on August 13, 2026 at 12:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4872-1 python-git security update
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Gitpython Project
Gitpython Project gitpython
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
Vendors & Products Gitpython Project
Gitpython Project gitpython
Type Values Removed Values Added
First Time appeared Gitpython-developers
Gitpython-developers gitpython
Vendors & Products Gitpython-developers
Gitpython-developers gitpython
Type Values Removed Values Added
Description GitPython before 3.1.54 contains an incomplete denylist in unsafe_git_clone_options that omits --template, allowing attackers to achieve arbitrary command execution during clone operations. Attackers can supply --template pointing to a directory containing malicious post-checkout hooks that execute when git clones the repository.
Title GitPython before 3.1.54 Remote Code Execution via --template
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 7.7, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 8, 2026, 3:24 PM
Reserved
Aug 13, 2026, 11:17 AM
Status
Analyzed
Published
Aug 13, 2026, 12:17 PM
Modified
Oct 24, 2026, 3:10 PM
Severity
Important
Public date
Aug 13, 2026, 11:28 AM