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. A malicious user 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 (CWE-22) and an 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 severity, while the EPSS score of < 1% suggests a low current exploitation probability and the vulnerability is not listed in CISA KEV. An attacker who can influence the parameters passed to Repo.archive() could read arbitrary files from the host filesystem and include them in the generated archive. The vulnerability requires code that invokes Repo.archive() with the disallowed --add-file or --add-virtual-file options.
OpenCVE Enrichment