Impact
GitPython before 3.1.57 contains an incomplete denylist that allows the unsafe_git_archive_options guard to accept the --add-file and --add-virtual-file options. An attacker who can influence the arguments passed to Repo.archive() can cause the function to read any file on the filesystem and include it in the generated archive, thereby compromising confidentiality. The weakness is a directory traversal and arbitrary file read flaw (CWE‑73).
Affected Systems
The vulnerability affects the GitPython library developed by gitpython-developers. Any code that imports gitpython and calls git.Repo.archive() before the 3.1.57 release is vulnerable. Specifically, systems running GitPython versions below 3.1.57, such as 3.1.56 or earlier, are impacted.
Risk and Exploitability
The CVSS score of 7.1 indicates a high likelihood for exploitation. No EPSS score is available, so we cannot quantify current exploitation probability, but the absence of the vulnerability from the KEV catalog suggests it is not a known exploited vulnerability at this time. Nonetheless, if an attacker can provide malicious options to the archive function—such as through untrusted input or a compromised dependency—they could read arbitrary files on the host. The typical attack vector involves code execution in the GitPython library context; local privilege may remain required unless the application runs with elevated privileges.
OpenCVE Enrichment