Description
GitPython before 3.1.51 fails to guard against dangerous Git options passed as keyword arguments in Repo.archive() and git.ls_remote(), allowing command injection via options such as --exec/--upload-pack (leading to arbitrary command execution). Additionally, Repo.iter_commits() and Repo.blame() do not check for leading-dash revision arguments, so a revision like --output=<path> can cause Git to open and truncate an arbitrary file. Exploitation requires an application that passes attacker-controlled arguments to these methods.
Published: 2026-08-01
Score: 8.6 High
EPSS: 1.0% Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

GitPython versions earlier than 3.1.51 allow an attacker to inject arbitrary Git options when calling Repo.archive() or git.ls_remote(), passing options such as --exec or --upload-pack directly to the Git binary and yielding command execution. The methods Repo.iter_commits() and Repo.blame() also fail to reject leading-dash revision arguments, so a revision like --output=<path> can cause Git to create or truncate a file at an attacker‑controlled location, enabling data loss or tampering. This vulnerability is a command injection flaw (CWE‑77).

Affected Systems

The vulnerability affects the GitPython project distributed by the gitpython‑developers. Versions before 3.1.51 are vulnerable; no other vendor or product details are listed.

Risk and Exploitability

The CVSS score of 8.6 indicates high severity, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires an application that forwards untrusted arguments to the affected methods, making the attack vector an application‑level privilege escalation that can lead to arbitrary command execution. EPSS data are not available, so the likelihood of exploitation cannot be quantified from the current information.

Generated by OpenCVE AI on August 2, 2026 at 03:01 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to GitPython 3.1.51 or newer, which validates and sanitizes Git options in all affected methods.
  • Verify that any arguments passed to Repo.archive(), git.ls_remote(), Repo.iter_commits(), and Repo.blame() do not originate from user‑controlled input or other untrusted sources.
  • If the application must use dangerous Git options such as --exec or --upload-pack, limit their use by configuring Git to run in a sandboxed environment or by restricting file system permissions to prevent unintended file creation or truncation.

Generated by OpenCVE AI on August 2, 2026 at 03:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 02 Aug 2026 21:00:00 +0000

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

Sat, 01 Aug 2026 12:45:00 +0000

Type Values Removed Values Added
Description GitPython before 3.1.51 fails to guard against dangerous Git options passed as keyword arguments in Repo.archive() and git.ls_remote(), allowing command injection via options such as --exec/--upload-pack (leading to arbitrary command execution). Additionally, Repo.iter_commits() and Repo.blame() do not check for leading-dash revision arguments, so a revision like --output=<path> can cause Git to open and truncate an arbitrary file. Exploitation requires an application that passes attacker-controlled arguments to these methods.
Title GitPython before 3.1.51 Command Injection via unguarded Git options
Weaknesses CWE-77
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 8.6, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/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-01T12:22:18.119Z

Reserved: 2026-07-29T13:07:21.183Z

Link: CVE-2026-67323

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-02T20:31:33Z

Weaknesses
  • CWE-77

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