GitPython versions up to 3.1.53 contain a vulnerability in the Commit.count() method where unguarded forwarding of options to git rev-list allows an attacker to specify an --output argument. This causes git rev-list to truncate an arbitrary file to zero bytes, resulting in file destruction. The vulnerability has medium severity with a CVSS score of 5.4. A patch is available that adds proper unsafe option checks to Commit.count().