From above:
The most effective way to protect against these vulnerabilities is to upgrade to Git 2.39.1. If you can’t update immediately, reduce your risk by taking the following steps:
- Avoid invoking the
--format
mechanism directly with the known operators, and avoid runninggit archive
in untrusted repositories.- If you expose
git archive
viagit daemon
, consider disabling it if working with untrusted repositories by runninggit config --global daemon.uploadArch false
.- Avoid using Git GUI on Windows when cloning untrusted repositories.