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.
Published: 2026-08-13
Score: 7.7 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

No advisories yet.

History

Thu, 13 Aug 2026 13:30:00 +0000

Type Values Removed Values Added
First Time appeared Gitpython-developers
Gitpython-developers gitpython
Vendors & Products Gitpython-developers
Gitpython-developers gitpython

Thu, 13 Aug 2026 11:45:00 +0000

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'}


Subscriptions

Gitpython-developers Gitpython
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-13T11:28:23.477Z

Reserved: 2026-08-13T11:17:25.160Z

Link: CVE-2026-73623

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-13T12:17:27.477

Modified: 2026-08-13T12:17:27.477

Link: CVE-2026-73623

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T13:15:03Z

Weaknesses
  • CWE-78

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