Description
GitPython before 3.2.0 contains an argument injection vulnerability in Head.checkout() that allows remote attackers to read arbitrary files by supplying a branch name parsed as a git option. Attackers can host a repository whose default branch is named --pathspec-from-file=<path>, causing cloning applications that check out the active branch to leak file contents through GitCommandError messages.
Published: 2026-10-14
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote File Read
Action: Update
AI Analysis

Impact

GitPython before version 3.2.0 contains an argument injection flaw in the Head.checkout() function. An attacker can craft a branch name that includes git options, causing the library to interpret the name as a command-line parameter. When this happens, the GitCommandError exposed by GitPython may leak the contents of an arbitrary file. The vulnerability is an instance of CWE-88, which relates to insecure handling of command-line arguments and can lead to unintended file disclosure.

Affected Systems

The affected product is GitPython, maintained by the GitPython developers. Versions earlier than 3.2.0 are vulnerable; any deployment that uses those releases needs to be reviewed. The issue applies to any environment that clones repositories and automatically checks out the active branch using the library's checkout feature.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity. Because the EPSS score is not available, the likelihood of exploitation cannot be quantified, but remote attackers can host a malicious repository to trigger the flaw. The vulnerability is not listed in the CISA KEV catalog, so it has not yet been confirmed as actively exploited. The typical attack path involves the adversary supplying a malicious default branch name such as --pathspec-from-file=<path>, which the library then executes as a git option and returns via an error message.

Generated by OpenCVE AI on October 15, 2026 at 12:03 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GitPython to version 3.2.0 or later to eliminate the injection handler flaw
  • Review any custom branch names in existing repositories to ensure they do not contain leading hyphens or git options
  • Validate or sanitize branch names before passing them to Head.checkout() in any custom code

Generated by OpenCVE AI on October 15, 2026 at 12:03 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

Sat, 17 Oct 2026 13:15:00 +0000

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

Thu, 15 Oct 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 15 Oct 2026 13:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Wed, 14 Oct 2026 23:00:00 +0000

Type Values Removed Values Added
Description GitPython before 3.2.0 contains an argument injection vulnerability in Head.checkout() that allows remote attackers to read arbitrary files by supplying a branch name parsed as a git option. Attackers can host a repository whose default branch is named --pathspec-from-file=<path>, causing cloning applications that check out the active branch to leak file contents through GitCommandError messages.
Title GitPython before 3.2.0 Arbitrary File Read via Head.checkout() Branch Name
First Time appeared Gitpython Project
Gitpython Project gitpython
Weaknesses CWE-88
CPEs cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:*:*:*
Vendors & Products Gitpython Project
Gitpython Project gitpython
References
Metrics cvssV3_1

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

cvssV4_0

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


Subscriptions

Gitpython-developers Gitpython
Gitpython Project Gitpython
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-15T15:40:26.986Z

Reserved: 2026-10-14T22:18:33.239Z

Link: CVE-2026-110859

cve-icon Vulnrichment

Updated: 2026-10-15T15:40:09.586Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-14T23:17:27.183

Modified: 2026-10-16T18:14:51.460

Link: CVE-2026-110859

cve-icon Redhat

Severity : Important

Publid Date: 2026-10-14T22:52:43Z

Links: CVE-2026-110859 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-17T13:00:09Z

Weaknesses
  • CWE-88

    Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')