## GitPython: separate_git_dir leaks env vars via crafted .gitmodules submodule name

- 種別: advisory
- 重大度: medium
- 関連技術: python
- 公開日時: 2026-10-27T15:26:32.000Z
- 情報源: GitHub Advisory Database (https://github.com/advisories/GHSA-fx3j-rwgx-fr94)
- パーマリンク: https://vulnpulse.app/items/ghsa-ghsa-fx3j-rwgx-fr94

影響: pip:GitPython <= 3.1.62 → 3.2.0
Repo._clone()'s handling of separate_git_dir never disables Git.polish_url()'s environment-variable expansion, unlike every other caller of that helper that handles attacker-influenced data. Since separate_git_dir can be derived from an attacker-controlled .gitmodules submodule name, a completely ordinary clone + submodule_update(init=True, recursive=True) on a malicious repository expands an environment variable of the attacker's choosing and exposes its value both as a persistent on-disk dire…