GHSA-p538-c434-8v24: GitPython: Arbitrary file truncation via git rev-list --output argument injection in unguarded Commit.count
Commit.count() forwards **kwargs into rev_list with no check_unsafe_options guard (the guard exists only in the sibling iter_items, commit.py:341). git rev-list --output=<path> opens and truncates the target file to 0 bytes before revision parsing, so count(output='/victim') destroys/blanks an arbitrary file.
References
- github.com/advisories/GHSA-p538-c434-8v24
- github.com/gitpython-developers/GitPython/commit/38553b6fddc7f6a667cdb45a6762343a08fc72b2
- github.com/gitpython-developers/GitPython/pull/2184
- github.com/gitpython-developers/GitPython/releases/tag/3.1.56
- github.com/gitpython-developers/GitPython/security/advisories/GHSA-p538-c434-8v24
Code Behaviors & Features
Detect and mitigate GHSA-p538-c434-8v24 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →