CyberRota Analysis
AI-GeneratedGitPython versions prior to 3.1.51 are vulnerable to command injection due to inadequate validation of dangerous Git options in methods like Repo.archive() and git.ls_remote(), which can lead to arbitrary command execution. Additionally, the lack of checks in Repo.iter_commits() and Repo.blame() allows for potential file truncation through leading-dash revision arguments. Organizations using GitPython in applications that accept user-controlled inputs should prioritize updating to mitigate these high-severity risks.
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.51 fails to guard against dangerous Git options passed as keyword arguments in Repo.archive() and git.ls_remote(), allowing command injection via options such as --exec/--upload-pack (leading to arbitrary command execution). Additionally, Repo.iter_commits() and Repo.blame() do not check for leading-dash revision arguments, so a revision like --output=<path> can cause Git to open and truncate an arbitrary file. Exploitation requires an application that passes attacker-controlled arguments to these methods.