CyberRota Analysis
AI-GeneratedGitPython versions prior to 3.1.56 are vulnerable to an argument injection flaw in the Commit.count() method, allowing attackers to manipulate options passed to this method. This can lead to the arbitrary truncation of files to zero bytes at the process's privilege level, posing a risk of data loss. Organizations using GitPython in applications that accept user-supplied options should prioritize updating to mitigate this vulnerability.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD Description
GitPython before 3.1.56 contains an argument injection vulnerability in the Commit.count() method, which forwards keyword arguments to 'git rev-list' without the check_unsafe_options guard present in the sibling iter_items method. An attacker who can control options passed to Commit.count (e.g., via an application that forwards a user-supplied options dict) can supply output=<path>, causing 'git rev-list --output=<path>' to open and truncate the target file to zero bytes before revision parsing. This allows destruction/blanking of an arbitrary file at the process's privilege level (no content control, 0-byte truncation).