Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. GitPython
  4. ›
  5. GHSA-fx3j-rwgx-fr94

GHSA-fx3j-rwgx-fr94: GitPython: separate_git_dir leaks env vars via crafted .gitmodules submodule name

October 27, 2026

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 directory name and, whenever DEBUG-level logging is enabled (a common CI/verbose-logging configuration), in a Popen(...) log line that is not redacted the way credential-bearing arguments are.

References

  • github.com/advisories/GHSA-fx3j-rwgx-fr94
  • github.com/gitpython-developers/GitPython/commit/9349ff58ee00c9fb14d515c8e693f33b2144b238
  • github.com/gitpython-developers/GitPython/pull/2255
  • github.com/gitpython-developers/GitPython/releases/tag/3.2.0
  • github.com/gitpython-developers/GitPython/security/advisories/GHSA-fx3j-rwgx-fr94

Code Behaviors & Features

Detect and mitigate GHSA-fx3j-rwgx-fr94 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 3.2.0

Fixed versions

  • 3.2.0

Solution

Upgrade to version 3.2.0 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

Source file

pypi/GitPython/GHSA-fx3j-rwgx-fr94.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 30 Oct 2026 00:15:48 +0000.