Advisory · CVE-2026-110859
GitPython checkout flaw can leak local files through a crafted branch name
GitPython before 3.2.0 lets a branch name be parsed as a git option in Head.checkout, so a crafted repository can leak local file contents through error messages. CVSS 4.0 8.7.
- Vendor
- GitPython
- Product
- GitPython
- Identifier / CWE
- CVE-2026-110859
CWE-88 - Action timing
- Immediate
Explain it like I’m five
A branch label is treated as an instruction, and the error message reads the file out loud.
- 01Crafted repository hosted
An attacker hosts a repository whose default branch name begins as a git file option.
- 02Repository cloned and checked out
An application using GitPython checks out the active branch.
- 03Branch parsed as option
Head.checkout treats the branch name as an option rather than plain data.
- 04File contents leak
Local file contents are exposed through GitCommandError messages.
What happened
The GitHub advisory for GitPython describes an argument injection flaw before 3.2.0 in Head.checkout. A branch name can be parsed as a git option.
A repository whose default branch uses such a name can cause cloning applications that check out the active branch to leak local file contents through error messages.
What to do
- Inventory applications that clone and check out untrusted repositories with GitPython.
- Upgrade GitPython to 3.2.0 or later using the project advisory guidance.
- Avoid checking out the active branch of untrusted repositories automatically until patched.
- Review error logs and error reporting channels for checkout failures that contain local file content.
- Rotate any credentials found in files that may have been leaked through those errors.
Management note
Error messages are an easy leak path to miss because they land in tickets and log aggregators. Search those stores, not just the application, if you ran affected checkouts.