GitPython versions before 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method that fails to validate git options passed through kwargs. Attackers can supply the --output argument via the other parameter or output kwarg to write patch content to attacker-chosen file paths at process privilege level.
Fix
Patch, vendor advisory and mitigation references on NVD 2
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-fjr4-x663-mwxc Exploit, Mitigation, Third Party Advisory
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-fjr4-x663-mwxc Exploit, Mitigation, Third Party Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 7.2 · gitpython_projectNVD modified 2026-10-23 18:10
Affected (CPE criteria) 1
cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
References 3
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-fjr4-x663-mwxc Exploit, Mitigation, Third Party Advisory
- https://www.vulncheck.com/advisories/gitpython-before-arbitrary-file-overwrite-via-diff Third Party Advisory
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-fjr4-x663-mwxc Exploit, Mitigation, Third Party Advisory