GitPython versions from 2.9.2 up to but not including 4.0.2 have an incomplete denylist for unsafe git clone options that omits the --template option. This omission allows an attacker who can influence clone options and stage a malicious post-checkout hook in a directory to achieve arbitrary command execution during a git clone operation. The vulnerability arises because git copies and executes hooks from the specified template directory during cloning, and the default denylist does not block --template. A fix is available in version 4.0.2.