# CVE-2026-78679: GitPython TagReference.create argument injection bypasses file-read guard

Source: https://junglewise.ai/threats/cve-2026-78679-gitpython-tagreference-create-argument-injection-bypasses-file  
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-78679 · Severity: medium · CVSS 6.5 · Published 2026-08-25

GitPython is a widely-used library for interacting with Git repositories programmatically. A flaw in the TagReference.create() method allows an attacker who controls the `reference` parameter to inject Git command-line options—specifically `--file`—to read arbitrary files on the host system. The vulnerability exists because the fix for a prior related issue only guarded keyword arguments, not positional ones. In vulnerable applications that pass user input directly to TagReference.create(), an attacker can exfiltrate sensitive files (such as SSH keys or credentials) by creating a specially-crafted tag request.

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

## Quick answers

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

**How severe is CVE-2026-78679?** 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-78679?** 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-78679 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-78679?** Check whether you run 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 argument-injection flaw (CWE-88) in GitPython's TagReference.create() method. The fix for CVE-2026-42215 (commit 3af0c251) added an unsafe-options guard but passed an empty args list to Git._option_candidates([], kwargs), meaning the guard only inspected keyword arguments. However, the `reference` and `path` parameters are passed as positional arguments to the internal git.tag() call. A user-controlled reference value like `reference="--file=/etc/passwd"` reaches the git command line unfiltered, allowing the attacker to inject the `--file` flag that should be blocked. The annotated tag message is then populated with the file's contents, enabling arbitrary file read at the process privileges. Exploitation requires the embedding application to forward caller-influenced values into TagReference.create(); default allow_unsafe_options=False provides no protection against this bypass. Fixed in GitPython 3.1.59.

## Affected products

- GitPython GitPython <= 3.1.58

## Identifiers

- CVE-2026-78679
- GHSA-3wxw-xv34-2frg
- PYSEC-2026-3837

## Timeline

- 2026-09-08: disclosed: Published to GitHub Advisory Database
- 2026-09-08: patched: GitPython 3.1.59 released with fix (commit 1b0d2d9)
- 2026-08-10: advisory: Initial advisory published
- 2026-09-08: other: GitHub reviewed advisory

## 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)
