Impact
GitPython prior to 3.2.0 has an information disclosure flaw that allows a malicious repository to expand environment variables when cloning. The vulnerability arises because separate_git_dir in Repo._clone() omits the expand_vars=False flag when calling Git.polish_url(). An attacker can craft a .gitmodules file with a submodule name containing variable syntax, causing the clone and subsequent submodule_update to reveal secrets in the .git/modules directory names and in DEBUG logs. This flaw directly compromises confidentiality, as sensitive environment data can be read by anyone able to trigger a clone operation.
Affected Systems
The flaw affects the GitPython project (gitpython-developers). All releases prior to 3.2.0 are impacted. Users of GitPython version 3.2.0 or later are not affected.
Risk and Exploitability
The vulnerability carries a CVSS score of 7.1, indicating a high severity. The EPSS score is not available, so the current likelihood of exploitation cannot be quantified, but the flaw has been documented publicly and can be trivially triggered by hosting a crafted repository or cloning one from an untrusted source. Because the issue is not listed in the CISA KEV catalog, there is currently no evidence of widespread exploitation. An attacker with the ability to control the repository can obtain confidential data through the exposed environment variables, but the vulnerability does not allow remote code execution or direct user interaction beyond the initial clone.
OpenCVE Enrichment
Debian DLA