CVE-2026-73619: GitPython incomplete denylist in Repo.archive allows arbitrary file read

CVE-2026-73619 · Severity: medium · CVSS 6.5 · Published 2026-08-13

GitPython is a Python library for interacting with Git repositories. The Repo.archive() method contains a security guard that blocks dangerous command-line options, but the blocklist is incomplete—it omits --add-file and --add-virtual-file. An authenticated attacker can use these options to read arbitrary files from the filesystem and include them in the archive they receive, exposing sensitive data like /etc/passwd.

Technologies: Gitpython Project Gitpython, gitpython (PyPI). Vendors: Gitpython Project, PyPI.

Quick answers

Is CVE-2026-73619 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-73619 being exploited in the wild.
How severe is CVE-2026-73619?
Medium severity, with a CVSS score of 6.5, published 13 August 2026.
Which products and versions are affected?
gitpython (PyPI) ECOSYSTEM:introduced=0,fixed=3.1.57.
Is there a fix for CVE-2026-73619?
Yes. gitpython (PyPI): upgrade to 3.1.57 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-73619 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-73619?
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.57 or later
    pip install "gitpython>=3.1.57"

Technical details

The vulnerability is an incomplete denylist (CWE-73: External Control of File Name or Path) in the unsafe_git_archive_options guard that protects the Repo.archive() method. The guard blocks --exec and --output/-o options but omits --add-file and --add-virtual-file. An attacker with code execution or authenticated access can pass these options to Repo.archive() via the add_file or add_virtual_file parameters, which are transformed into command-line arguments and passed directly to git archive. The --add-file option reads arbitrary filesystem paths (including absolute paths outside the repository) and includes them in the returned archive; --add-virtual-file injects attacker-controlled content under an attacker-chosen name. Exploitation requires the ability to call Repo.archive() with attacker-controlled parameters. A fix is available in version 3.1.57 and later.

Affected products

  • GitPython GitPython before 3.1.57

Identifiers

  • CVE-2026-73619
  • GHSA-539m-9xh6-q6rr
  • PYSEC-2026-3948

Timeline

  • 2026-07-26: disclosed
  • 2026-08-13: advisory
  • 2026-08-13: patched: GitPython 3.1.57

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.