PT-2026-71449 · Pypi+1 · Gitpython+1
CVSS v3.1
5.4
Medium
| Vector | AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L |
Name of the Vulnerable Software and Affected Versions
GitPython versions prior to 3.1.56
Description
An argument injection issue exists in the
Commit.count() method, which forwards keyword arguments to git rev-list without utilizing the check unsafe options guard. An attacker capable of controlling the options passed to Commit.count() can provide the output variable with a specific file path. This causes the system to execute git rev-list --output=<path>, which opens and truncates the target file to zero bytes, resulting in the destruction of an arbitrary file at the privilege level of the process.Recommendations
Update GitPython to version 3.1.56 or later.
As a temporary mitigation, restrict or validate any user-supplied options passed to the
Commit.count() method.Exploit
Fix
Argument Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Gitpython
Red Os