CVE 8.1 HIGH

GitPython: Unsafe option check validates multi_options before shlex.split transforms it_CVE-2026-42284

8.1 / 10
HIGH
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Description

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.

Basic Information

ID CVE-2026-42284
Source GitHub_M
Published May 7, 2026 at 18:19

Affected Product

Vendor gitpython-developers
Product GitPython
Version < 3.1.47
Affected Versions gitpython-developers GitPython < 3.1.47

CWE Classification

References

💭 Join the Security Discussion

🔒 Your email address will not be published. Required fields are marked *

⚠️ Please be respectful and constructive in your comments. Security discussions should remain professional.