Vulnerability
CVE-2026-67322
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.
36 advisories report this vulnerability, across 9 ecosystems.
Advisories in Chainguard
- CGA-2hx9-gcfc-2fvp
- CGA-2wg4-p4c7-3qfr
- CGA-3gw4-q932-824c
- CGA-6w5m-xc4v-79jc
- CGA-7r85-gw2x-3jhm
- CGA-96j8-xx4v-wrp3
- CGA-c4rg-6jjj-8vr2
- CGA-cw55-hffj-854c
- CGA-f2rq-g7p8-jhp4
- CGA-gf4q-vj84-8gc9
- CGA-hwjq-gvpf-hrm6
- CGA-hwp6-92w6-3hc8
- CGA-mww4-25h8-wmw9
- CGA-p2h8-r9xh-h4f9
- CGA-pch2-xj4h-54v9
- CGA-w7qj-jh8p-vx8x