GitPython before 3.2.0 Arbitrary File Read via Head.checkout() Branch Name
gitpython-developers GitPython
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| gitpython PyPI |
|
|
Original 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.
From the CVE record · VulnCheck
References
- github.com/gitpython-developers/GitPython/security/advisories/GHSA-23mf-xhv8-69c2Exploit
- vulncheck.com/advisories/gitpython-before-3.2.0-arbitrary-file-read-via-head-checkout-branch-name
- github.com/CVEProject/cvelistV5/tree/main/cves/2026/110xxx/CVE-2026-110859.json
- nvd.nist.gov/vuln/detail/CVE-2026-110859
- github.com/gitpython-developers/GitPython/pull/2233
- github.com/gitpython-developers/GitPython/commit/8da65080849a56a2fc9f3e7817bbf0524e8397d5
- github.com/gitpython-developers/GitPython
- github.com/gitpython-developers/GitPython/releases/tag/3.2.0