CVE-2023-40267
CriticalCVSS 9.8Exploitation Probability (EPSS)
Elevated risk57th percentile - higher than 57% of all known CVEs
Summary
GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. This issue exists because of an incomplete fix for CVE-2022-24439.
Risk Assessment
Organizations may be exposed to the exploitation of insecure options, potentially leading to unauthorized access to repositories.
Recommendation
It is recommended to upgrade GitPython to version 3.1.32 or later to mitigate the risk associated with this vulnerability.
Other vulnerabilities in GitPython
See all- CVE-2026-44244High
GitPython is a Python library used to interact with Git repositories. In versions prior to 3.1.49, the GitConfigParser.set_value() method did not validate values for newlines, allowing for the injection of malicious paths into Git configuration.
- CVE-2026-44243High
GitPython is a Python library used to interact with Git repositories. Prior to version 3.1.48, a vulnerability allowed attackers to manipulate files outside the repository's .git directory due to insufficient validation of reference paths.
- CVE-2026-42284High
GitPython is a Python library used to interact with Git repositories. In versions prior to 3.1.47, the _clone() function improperly validates multi_options, allowing malicious hooks to be executed during repository cloning.
- CVE-2026-42215High
GitPython is a Python library used to interact with Git repositories. From version 3.1.30 to before version 3.1.47, the library blocks dangerous Git options, but equivalent Python kwargs can bypass that check, leading to arbitrary command execution.
- GHSA-f9j4-qggq-h239High
In GitPython, Remote.pull() forwards its positional refspec argument directly to the git pull child process while its unsafe-option guard inspects only keyword arguments. An application that passes attacker-influenced data as the refspec (e.g., a user-supplied branch name) may allow injection of unsafe options.
- GHSA-m64x-33q8-m5h7High
This is a residual of GHSA-g5vv-9gxw-82hx / CVE-2026-87819. The 3.1.60 fix made Actor._from_string regex-free, but parse_actor_and_date still runs _re_actor_epoch on the same author/committer/tagger line one step earlier. That pattern backtracks quadratically when the trailing epo...
- GHSA-59cr-6r3x-644wMedium
GitPython 3.1.61 (and main) has a gap in git/objects/submodule/base.py — the fix for GHSA-hmq2-w58f-27jc added Submodule._validated_name(), but the description does not fully specify the scope. The code is identical in 3.1.61 and main.
- GHSA-w8jc-g24h-crhwHigh
GitPython spent 2022-2026 rolling out two reusable guards method-by-method: Git.check_unsafe_protocols(url) (raises UnsafeProtocolError for <transport>:: remote-helper URLs) and Git.check_unsafe_options(...) (raises UnsafeOptionError for denylisted options). The description indicates the rollout did not cover all code paths.
- GHSA-jm78-9fvv-mhgrHigh
GitPython's config-name validator only neutralizes CR/LF/NUL for the "option" label; it does not reject =, #, ;, [, ], or whitespace in an option name. write_section writes the option name verbatim into the config file, so an option name such as sshCommand = touch <cmd> can inject configuration.
- GHSA-gq48-pqfc-9p58Medium
GitPython's public Submodule.move() API verifies that its destination is lexically inside the parent repository, but does not reject symbolic links in the destination's intermediate components before filesystem operations. On systems that check out Git symlinks, an untrusted repository may exploit this.
Original NVD description (English source)
GitPython before 3.1.32 does not block insecure non-multi options in clone and clone_from. NOTE: this issue exists because of an incomplete fix for CVE-2022-24439.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

