Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. GitPython
  4. ›
  5. GHSA-6p8h-3wgx-97gf

GHSA-6p8h-3wgx-97gf: GitPython: Incomplete unsafe_git_clone_options denylist omits --template enabling arbitrary command execution via clone hooks

July 24, 2026

GitPython’s unsafe_git_clone_options denylist omits --template. git clone --template=<dir> copies <dir>/hooks/ into the new repository and runs them (post-checkout fires during clone), so a caller who can influence clone options can achieve arbitrary command execution in the default allow_unsafe_options=False configuration.

References

  • github.com/advisories/GHSA-6p8h-3wgx-97gf
  • github.com/gitpython-developers/GitPython/commit/ffcb5359e87619f4fe4a70a4aff5f08c5580ba97
  • github.com/gitpython-developers/GitPython/pull/2180
  • github.com/gitpython-developers/GitPython/releases/tag/3.1.54
  • github.com/gitpython-developers/GitPython/security/advisories/GHSA-6p8h-3wgx-97gf

Code Behaviors & Features

Detect and mitigate GHSA-6p8h-3wgx-97gf with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.1.54

Fixed versions

  • 3.1.54

Solution

Upgrade to version 3.1.54 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-184: Incomplete List of Disallowed Inputs
  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Source file

pypi/GitPython/GHSA-6p8h-3wgx-97gf.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sat, 08 Aug 2026 00:18:07 +0000.