GitPython is a python library used to interact with Git repositories. From version 3.1.30 to before version 3.1.47, GitPython blocks dangerous Git options such as --upload-pack and --receive-pack by default, but the equivalent Python kwargs upload_pack and receive_pack bypass that check. If an application passes attacker-controlled kwargs into Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push(), this leads to arbitrary command execution even when allow_unsafe_options is left at its default value of False. This issue has been patched in version 3.1.47.
Advisories
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-rpm5-65cw-6hj4 | GitPython has Command Injection via Git options bypass |
Fixes
Solution
No solution given by the vendor.
Workaround
No workaround given by the vendor.
References
History
Thu, 07 May 2026 21:45:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Gitpython Project
Gitpython Project gitpython |
|
| Vendors & Products |
Gitpython Project
Gitpython Project gitpython |
Thu, 07 May 2026 19:00:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Description | GitPython is a python library used to interact with Git repositories. From version 3.1.30 to before version 3.1.47, GitPython blocks dangerous Git options such as --upload-pack and --receive-pack by default, but the equivalent Python kwargs upload_pack and receive_pack bypass that check. If an application passes attacker-controlled kwargs into Repo.clone_from(), Remote.fetch(), Remote.pull(), or Remote.push(), this leads to arbitrary command execution even when allow_unsafe_options is left at its default value of False. This issue has been patched in version 3.1.47. | |
| Title | GitPython: Command injection via Git options bypass | |
| Weaknesses | CWE-78 | |
| References |
| |
| Metrics |
cvssV3_1
|
Projects
Sign in to view the affected projects.
Status: PUBLISHED
Assigner: GitHub_M
Published:
Updated: 2026-05-07T18:17:03.194Z
Reserved: 2026-04-25T05:04:37.028Z
Link: CVE-2026-42215
No data.
Status : Undergoing Analysis
Published: 2026-05-07T19:16:01.640
Modified: 2026-05-07T19:49:21.197
Link: CVE-2026-42215
No data.
OpenCVE Enrichment
Updated: 2026-05-07T21:24:32Z
Weaknesses
Github GHSA