# CVE-2026-78678: GitPython arbitrary file read in Repo.blame via incomplete option denylist

Source: https://junglewise.ai/threats/cve-2026-78678-gitpython-arbitrary-file-read-in-repo-blame-via-incomplete-option  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-25. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-78678 · Severity: medium · CVSS 6.5 · Published 2026-08-25

GitPython's Repo.blame() function is used by applications to query source code authorship and commit history. The function has an input validation check intended to block dangerous Git command-line options, but the allowlist is incomplete—it blocks write operations (--output) but not read operations (--contents, -S). An attacker controlling the revision parameter can inject these options to read arbitrary files on the system as the process owner, with results leaked back to the caller.

Technologies: [Gitpython Project Gitpython](https://junglewise.ai/threats/technologies/gitpython), [gitpython (PyPI)](https://junglewise.ai/threats/technologies/pypi-gitpython). Vendors: [Gitpython Project](https://junglewise.ai/threats/vendors/gitpython-project), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-78678 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-78678 being exploited in the wild.

**How severe is CVE-2026-78678?** Medium severity, with a CVSS score of 6.5, published 25 August 2026.

**Which products and versions are affected?** gitpython (PyPI) ECOSYSTEM:introduced=0,fixed=3.1.59.

**Is there a fix for CVE-2026-78678?** Yes. gitpython (PyPI): upgrade to 3.1.59 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-78678 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-78678?** Check whether you run Gitpython Project Gitpython or gitpython (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- gitpython (PyPI): upgrade to 3.1.59 or later

  ```sh
  pip install "gitpython>=3.1.59"
  ```


## Technical details

The vulnerability is an incomplete option denylist in the unsafe_git_revision_options guard used by Repo.blame() and Repo.blame_incremental(). The denylist contains only ["--output", "-o"], which block file writes. However, the `git blame` command also honors --contents <file> and -S <file> options that cause the specified file's lines to be echoed into the blame output—enabling arbitrary file READ. Neither option appears in the denylist. When an attacker-controlled revision string containing --contents=/etc/passwd is passed to blame(), the check_unsafe_options() guard fails to block it (the canonical name "contents" is not in the denylist), and the option is passed unsanitized to the git command, placing it before the -- separator. The file's line contents appear in the returned blame result. The attack requires the caller to forward user-influenced revision values to blame(); no authentication or user interaction is needed. Patched in version 3.1.59.

## Affected products

- GitPython GitPython <= 3.1.58

## Identifiers

- CVE-2026-78678
- GHSA-5xxx-qhh7-9287
- PYSEC-2026-3788

## Timeline

- 2026-09-08: disclosed
- 2026-09-08: patched: Fixed in version 3.1.59

## References

- [https://api.github.com/users/manus-use](https://api.github.com/users/manus-use)
- [https://github.com/manus-use](https://github.com/manus-use)
- [https://api.github.com/users/manus-use/gists%7B/gist_id%7D](https://api.github.com/users/manus-use/gists%7B/gist_id%7D)
- [https://api.github.com/users/manus-use/repos](https://api.github.com/users/manus-use/repos)
- [https://avatars.githubusercontent.com/u/213290975?v=4](https://avatars.githubusercontent.com/u/213290975?v=4)
- [https://api.github.com/users/manus-use/events%7B/privacy%7D](https://api.github.com/users/manus-use/events%7B/privacy%7D)

## Related threats

- [GitPython command wrappers omit unsafe protocol and option checks](https://junglewise.ai/threats/cve-2026-110857-gitpython-command-wrappers-omit-unsafe-protocol-and-option)
- [GitPython submodule path traversal to arbitrary hook execution](https://junglewise.ai/threats/cve-2026-114145-gitpython-is-a-python-library-used-to-interact-with-git)
- [GitPython symlink following in Submodule.move()](https://junglewise.ai/threats/cve-2026-110860-gitpython-from-3-1-62-before-3-2-0-contains-a-symlink-following)
- [GitPython argument injection in Head.checkout()](https://junglewise.ai/threats/cve-2026-110859-gitpython-before-3-2-0-contains-an-argument-injection)
- [GitPython remote code execution in Remote.pull() refspec argument](https://junglewise.ai/threats/cve-2026-110858-gitpython-from-3-1-30-before-3-2-0-contains-a-remote-code)
