CVE-2026-110859: GitPython before 3.2.0 Arbitrary File Read via Head.checkout() Branch Name

Published Oct 14, 2026
·
Updated

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.

Affected Software

1 affected component
pypi/GitPython<3.2.0

Event History

Oct 14, 2026
CVE Published
via MITRE·10:52 PM
Data Sourced
via MITRE·10:52 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using GitPython before 3.2.0 are exposed if they clone an attacker-controlled repository and check out its active/default branch using Head.checkout().

2

What does an attacker need to exploit it?

The attacker needs to provide or host a repository whose default branch name is interpreted as a Git option, such as --pathspec-from-file=<path>. No authentication or user interaction is required according to the supplied vector.

3

What information can be disclosed?

The issue can cause arbitrary local file contents to be included in GitCommandError messages. Exposure therefore depends on whether those error messages are returned, displayed, or logged where an attacker can access them.

4

What should be done if an immediate upgrade is not possible?

Do not clone or check out repositories controlled by untrusted parties with affected GitPython code paths. In particular, avoid calling Head.checkout() on the active branch of untrusted repositories and restrict access to error logs that may contain leaked contents.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203