GHSA-7jx3-jqcp-hhgc
Duplicate Advisory: GitPython: Unguarded git read-tree option forwarding in IndexFile.from_tree/reset/merge_tree enables arbitrary file overwrite
Impact
## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-4gmw-gg2m-w46p. This link is maintained to preserve external references. ## Original Description GitPython versions before 3.1.58 contain an arbitrary file overwrite vulnerability in IndexFile.from_tree, IndexFile.reset, and IndexFile.merge_tree methods that append caller-influenced treeish strings to git read-tree without option validation or argument separation. Attackers can inject the --index-output option to overwrite arbitrary files with a valid git-index blob, destroying existing file content at attacker-controlled writable paths.
An attacker can exploit this over the network, with a regular user account, without any action by a user. If it succeeds: high risk of data or systems being changed, high risk of outages.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| pip | gitpython | <= 3.1.57 | none recorded |