CVE-2021-21300
malicious repositories can execute remote code while cloning
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
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.
Official description from the CVE record, published by GitHub_M. Copyright © 1999-2026 The MITRE Corporation. See /security/cve/legal for the CVE license. View the record on cve.org
Key data
CVSS 3.1 High 8.0
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
Attack vector: Network
The vulnerable component can be reached over a network, possibly from the Internet.
Attack complexity: High
The attack depends on conditions outside the attacker's control, so it takes preparation.
Privileges required: None
No account or privileges are needed.
User interaction: Required
A user has to do something first, such as opening a file or following a link.
Scope: Changed
The impact can reach other components beyond the vulnerable one.
Confidentiality impact: High
Serious or total effect on the secrecy of data.
Integrity impact: High
Serious or total effect on the trustworthiness of data.
Availability impact: None
No effect on availability.
| Metric | Value | What it means |
|---|---|---|
| Attack vector | Network | The vulnerable component can be reached over a network, possibly from the Internet. |
| Attack complexity | High | The attack depends on conditions outside the attacker's control, so it takes preparation. |
| Privileges required | None | No account or privileges are needed. |
| User interaction | Required | A user has to do something first, such as opening a file or following a link. |
| Scope | Changed | The impact can reach other components beyond the vulnerable one. |
| Confidentiality impact | High | Serious or total effect on the secrecy of data. |
| Integrity impact | High | Serious or total effect on the trustworthiness of data. |
| Availability impact | None | No effect on availability. |
CVSS is owned and managed by FIRST.Org, Inc. (FIRST) and is used by permission. Each CVSS score on this site is shown together with its vector string, as published in the CVE record by the source named next to it. Learn more at first.org/cvss.
EPSS
- Score
- 0.88533 (88.5% probability)
- Percentile
- 99.8%
- Scores of
- Nov 10, 2026
- Model
- v2026.06.15
Weakness (CWE)
- CWE-59Improper Link Resolution Before File Access
Affected products
git
- affected: >= 2.14.2, < 2.17.62.17.6
- affected: >= 2.18.0, < 2.18.5
- affected: >= 2.19.0, < 2.19.6
- affected: >= 2.20.0, < 2.20.5
- affected: >= 2.21.0, < 2.21.4
- affected: >= 2.22.0, < 2.22.5
- affected: >= 2.23.0, < 2.23.4
- affected: >= 2.24.0, < 2.24.4
- affected: >= 2.25.0, < 2.25.5
- affected: >= 2.26.0, < 2.26.3
- affected: >= 2.27.0, < 2.27.1
- affected: >= 2.28.0, < 2.28.1
- affected: >= 2.29.0, < 2.29.3
- affected: >= 2.30.0, < 2.30.1
References
- github.com/git/git/security/advisories/GHSA-8prw-h3cq-mghm
- lore.kernel.org/git/xmqqim6019yd.fsf%40gitster.c.googlers.c…
- git-scm.com/docs/git-config
- git-scm.com/docs/gitattributes
- github.com/git/git/commit/684dd4c2b414bcf648505e74498a608f2…
- [oss-security] 20210309 git: malicious repositories can execute remote code while cloning (openwall.com)mailing-list
- FEDORA-2021-63fcbd126e (lists.fedoraproject.org)vendor-advisory
- FEDORA-2021-ffd0b2108d (lists.fedoraproject.org)vendor-advisory
- FEDORA-2021-03e61a6647 (lists.fedoraproject.org)vendor-advisory
- support.apple.com/kb/HT212320
- 20210427 APPLE-SA-2021-04-26-10 Xcode 12.5 (seclists.org)mailing-list
- GLSA-202104-01 (security.gentoo.org)vendor-advisory
- packetstormsecurity.com/files/163978/Git-LFS-Clone-Command-…
- [debian-lts-announce] 20221010 [SECURITY] [DLA 3145-1] git security update (lists.debian.org)mailing-list
Timeline
- ID reserved
- Record published
- Record last updated
Look up another CVE
About CubePath
Data from the CVE Program (MITRE), CISA KEV and FIRST EPSS. CVSS is owned by FIRST and used by permission. Not affiliated with or endorsed by MITRE, CISA or FIRST. Data as of Nov 10, 2026, 19:52 UTC. Sources and licenses