VDB
Sign up

PYSEC-2026-3787

Quick fix

PYSEC-2026-3787 — gitpython: upgrade to the fixed version with the command below.

pip install --upgrade 'gitpython>=3.1.59'

Details

GitPython before 3.1.59 omits --separate-git-dir from unsafe_git_clone_options, allowing attackers to create arbitrary git directories outside the intended clone destination. Attackers can pass a separate_git_dir parameter to Repo.clone_from() or Repo.clone() to redirect repository metadata to an attacker-controlled filesystem path, enabling arbitrary directory creation and potential hook execution.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/gitpython
Introduced in: 0Fixed in: 3.1.59
Fixpip install --upgrade 'gitpython>=3.1.59'

References