top of page
perceptive_background_267k.jpg

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:

1 August 2026 at 00:00:00

Alert date:

1 August 2026 at 16:10:41

Source:

nvd.nist.gov

Click to open the original link from this advisory

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:

Related CVE's:

Related threat actors:

IOC's:

This article was created with the assistance of AI technology by Perceptive.

© 2025 by Perceptive Security. All rights reserved.

email: info@perceptivesecurity.com

Disclaimer: Deze website toont informatie afkomstig van externe bronnen. Perceptive aanvaardt geen verantwoordelijkheid voor de inhoud, juistheid of volledigheid van deze informatie.

bottom of page