CyberRota Analysis
AI-GeneratedGitPython versions prior to 3.1.52 are susceptible to environment-variable exfiltration through the Repo.clone_from() function, where an attacker can manipulate the clone URL to include tokens that expose sensitive environment variables. This vulnerability can lead to the unintended disclosure of secrets such as AWS credentials or GitHub tokens during the cloning process. Organizations using affected versions of GitPython should prioritize patching to mitigate the risk of credential leakage.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD Description
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(), which on non-Cygwin platforms calls os.path.expandvars() on the URL before invoking git clone. An attacker who controls the clone URL can embed $NAME or ${NAME} tokens that are expanded to the values of the hosting process's environment variables (e.g., AWS_SECRET_ACCESS_KEY or GITHUB_TOKEN). The resulting URL, now containing the secret, is transmitted over the network to an attacker-controlled host during the clone attempt, disclosing the secret.