{"id":"CVE-2026-42215","summary":"GitPython: Command injection via Git options bypass","details":"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.","aliases":["GHSA-rpm5-65cw-6hj4"],"modified":"2026-07-08T08:13:13.705460878Z","published":"2026-05-07T18:17:03.194Z","related":["CGA-4vjv-wcm3-r5v5","SUSE-SU-2026:21813-1","openSUSE-SU-2026:10758-1","openSUSE-SU-2026:20777-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42215.json","cwe_ids":["CWE-78"],"cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://github.com/gitpython-developers/GitPython/releases/tag/3.1.47"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42215.json"},{"type":"ADVISORY","url":"https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6hj4"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42215"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/gitpython-developers/gitpython","events":[{"introduced":"141cd651e459bff8919798b3ccf03dfa167757f6"},{"fixed":"4199cb89755f705801a4cb241723325b46201f51"}],"database_specific":{"source":["AFFECTED_FIELD","CPE_RANGE","REFERENCES"],"extracted_events":[{"introduced":"3.1.30"},{"fixed":"3.1.47"}],"cpe":"cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*"}}],"versions":["3.1.44","3.1.43","3.1.42","3.1.41","3.1.40","3.1.38","3.1.35","3.1.34","3.1.33","3.1.32","3.1.31","3.1.30"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-42215.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}