Skip to main content
← All vulnerabilities
CVE-2026-42284GHSA-X2QX-6953-8485PYSEC-2026-2161

GitPython: Unsafe option check validates multi_options before shlex.split transforms it

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.1.47
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: total

Summary

GitPython is a python library used to interact with Git repositories. Prior to version 3.1.47, _clone() validates multi_options as the original list, then executes shlex.split(" ".join(multi_options)). A string like "--branch main --config core.hooksPath=/x" passes validation (starts with --branch), but after split becomes ["--branch", "main", "--config", "core.hooksPath=/x"]. Git applies the config and executes attacker hooks during clone. This issue has been patched in version 3.1.47.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • gitpython-developers GitPython

    fixed in 3.1.47

  • gitpythonPyPI

    fixed in 3.1.47

References 2

GitHub · gitpython-developers/GitPython