← Back to overview

GitPython versions before 3.1.59 contain a vulnerability where the --separate-git-dir option is omitted from the unsafe_git_clone_options list. This oversight allows attackers to pass a separate_git_dir parameter to Repo.clone_from() or Repo.clone() methods, redirecting repository metadata to an attacker-controlled filesystem path. The flaw enables arbitrary directory creation outside the intended clone destination, and could potentially lead to hook execution if the attacker can place malicious git hooks in the redirected directory. The vulnerability is a path traversal-class issue affecting Python projects that use GitPython for git operations. A fix was introduced in GitPython version 3.1.59, and users are advised to upgrade immediately. The issue has been documented in the official GitHub security advisory and tracked by VulnCheck.

Affected products

  • GitPython before 3.1.59

Related CVE's

  • CVE-2026-78677

Categories

  • Supply Chain & Dependencies
  • Web Technologies