CVE-2026-110859

GitPython before 3.2.0 Arbitrary File Read via Head.checkout() Branch Name

Published Oct 14, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

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
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
Metrics ssvc

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

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

Weaknesses
  • CWE-88

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

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 15, 2026, 3:40 PM
Reserved
Oct 14, 2026, 10:18 PM
Status
Awaiting Analysis
Published
Oct 14, 2026, 11:17 PM
Modified
Oct 16, 2026, 6:14 PM
Severity
Important
Public date
Oct 14, 2026, 10:52 PM