Vulnerability record · CVE-2021-21300 · published 9 March 2021
CVE-2021-21300: Git clone symlink and clean/smudge filter command execution
Git Scm · Git
Git mishandles symbolic links combined with clean/smudge filters such as Git LFS when cloning onto case-insensitive file systems (NTFS, HFS+, APFS). A crafted repository can cause a just-checked-out script to execute during clone, and Git for Windows enables Git LFS by default, making it vulnerable out of the box.
Description
Git is an open-source distributed revision control system. In affected versions of Git a specially crafted repository that contains symbolic links as well as files using a clean/smudge filter such as Git LFS, may cause just-checked out script to be executed while cloning onto a case-insensitive file system such as NTFS, HFS+ or APFS (i.e. the default file systems on Windows and macOS). Note that clean/smudge filters have to be configured for that. Git for Windows configures Git LFS by default, and is therefore vulnerable. The problem has been patched in the versions published on Tuesday, March 9th, 2021. As a workaound, if symbolic link support is disabled in Git (e.g. via `git config --global core.symlinks false`), the described attack won't work. Likewise, if no clean/smudge filters such as Git LFS are configured globally (i.e. _before_ cloning), the attack is foiled. As always, it is best to avoid cloning repositories from untrusted sources. The earliest impacted version is 2.14.2. The fix versions are: 2.30.1, 2.29.3, 2.28.1, 2.27.1, 2.26.3, 2.25.5, 2.24.4, 2.23.4, 2.22.5, 2.21.4, 2.20.5, 2.19.6, 2.18.5, 2.17.62.17.6.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Automated analysis
high priorityRemote code execution on clone with a very high EPSS score and public exploit references, though it requires user interaction and specific file system and filter configuration.
What it is
Git mishandles symbolic links combined with clean/smudge filters such as Git LFS when cloning onto case-insensitive file systems (NTFS, HFS+, APFS). A crafted repository can cause a just-checked-out script to execute during clone, and Git for Windows enables Git LFS by default, making it vulnerable out of the box.
Impact
An attacker who convinces a victim to clone a malicious repository can execute arbitrary code with the victim's privileges on the cloning machine.
Attack surface
Reached over the network by cloning a crafted repository; no authentication is required, but user interaction (the victim performing the clone) is needed, and the target must use a case-insensitive file system with a clean/smudge filter configured.
Exploitation
Not listed in CISA KEV, but EPSS is very high (0.88533, 99.765th percentile) and multiple references are tagged Exploit, indicating public exploit material exists.
What to do
- Upgrade Git to a fixed release (2.30.1, 2.29.3, 2.28.1, 2.27.1, 2.26.3, 2.25.5, 2.24.4, 2.23.4, 2.22.5, 2.21.4, 2.20.5, 2.19.6, 2.18.5, or 2.17.6) or later.
- Set core.symlinks to false globally to disable symbolic link support and block the attack path.
- Avoid configuring clean/smudge filters such as Git LFS globally before cloning untrusted repositories.
- Do not clone repositories from untrusted sources.
- Apply vendor updates for Git for Windows, Xcode, Fedora, and Debian packages that bundle affected Git versions.
Detection
- Monitor clone operations that create symbolic links alongside filter-process activity, especially on Windows and macOS endpoints.
- Alert on unexpected child processes spawned by git or git-lfs during clone or checkout.
- Audit global Git configuration for core.symlinks and filter settings that enable the vulnerable path.
- Review repository contents for symlinks paired with filter attributes in .gitattributes before cloning.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
4 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
Track CVE-2021-21300 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2021-21300), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.