


Perceptive Security
SOC/SIEM Consultancy

GitPython before 3.1.52 is vulnerable to environment-variable exfiltration in Repo.clone_from(). The caller-supplied remote URL is passed through Git.polish_url…
Published:
31 juli 2026 om 22:00:00
Alert date:
1 augustus 2026 om 14:10:41
Source:
nvd.nist.gov
Supply Chain & Dependencies, Data Breach & Exfiltration, Identity & Access
GitPython versions before 3.1.52 contain a vulnerability in Repo.clone_from() that allows environment variable exfiltration. The function passes caller-supplied remote URLs through Git.polish_url(), which calls os.path.expandvars() on non-Cygwin platforms before invoking git clone. An attacker who controls the clone URL can embed shell variable tokens such as $NAME or ${NAME} that get expanded to actual environment variable values in the hosting process. Sensitive credentials such as AWS_SECRET_ACCESS_KEY or GITHUB_TOKEN can be embedded into the resulting URL. This expanded URL is then transmitted over the network to an attacker-controlled host during the clone attempt, effectively disclosing the secret. The fix is to upgrade to GitPython 3.1.52 or later.
Technical details
Mitigation steps:
Affected products:
GitPython < 3.1.52
Related links:
https://nvd.nist.gov/vuln/detail/CVE-2026-67322
https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rwj8-pgh3-r573
https://www.vulncheck.com/advisories/gitpython-before-environment-variable-exfiltration-via-clone-from
Related CVE's:
Related threat actors:
IOC's:
This article was created with the assistance of AI technology by Perceptive.
