Home / git / git / CVE-2021-21300
CVE-2021-21300: is it exploited, and which versions of git are affected and fixed?
CVE-2021-21300 is a link following (a symlink lets an attacker reach other files) vulnerability in git. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 17:39 UTC). Affected: git >= 2.14.2, < 2.17.62.17.6, git >= 2.18.0, < 2.18.5, git >= 2.19.0, < 2.19.6 and 11 more (CVE record by GitHub_M). Fixed in 2.17.6, 2.18.5, 2.19.6, 2.20.5 and 2 more (NVD). Severity: High (8.0, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 17:39 UTC, CVE record November 19, 2026, 07:15 UTC and NVD November 19, 2026, 08:03 UTC.
What is CVE-2021-21300?
malicious repositories can execute remote code while cloning
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.
From the CVE record by GitHub_M, last updated August 3, 2024, 18:09 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| git | git | >= 2.14.2, < 2.17.62.17.6 >= 2.18.0, < 2.18.5 >= 2.19.0, < 2.19.6 >= 2.20.0, < 2.20.5 >= 2.21.0, < 2.21.4 >= 2.22.0, < 2.22.5 >= 2.23.0, < 2.23.4 >= 2.24.0, < 2.24.4 >= 2.25.0, < 2.25.5 >= 2.26.0, < 2.26.3 >= 2.27.0, < 2.27.1 >= 2.28.0, < 2.28.1 and 2 more ranges |
As the CVE record by GitHub_M states it, last updated August 3, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| git-scm | git | through 2.14.2 | application |
| git-scm | git | from 2.17.0 before 2.17.6 | application |
| git-scm | git | from 2.18.0 before 2.18.5 | application |
| git-scm | git | from 2.19.0 before 2.19.6 | application |
| git-scm | git | from 2.20.0 before 2.20.5 | application |
| git-scm | git | from 2.21.0 before 2.21.4 | application |
| git-scm | git | from 2.22.0 before 2.22.5 | application |
| git-scm | git | from 2.23.0 before 2.23.4 | application |
| git-scm | git | from 2.24.0 before 2.24.4 | application |
| git-scm | git | from 2.25.0 before 2.25.5 | application |
| git-scm | git | from 2.26.0 before 2.26.3 | application |
| git-scm | git | from 2.29.0 before 2.29.3 | application |
| git-scm | git | from 2.30.0 before 2.30.2 | application |
| git-scm | git | 2.27.0 | application |
| git-scm | git | 2.28.0 | application |
| fedoraproject | fedora | 32 | operating system |
| fedoraproject | fedora | 33 | operating system |
| fedoraproject | fedora | 34 | operating system |
| apple | xcode | before 12.5 | application |
| debian | debian linux | 10.0 | operating system |
NVD analysis (status Modified), last modified June 17, 2026, 03:35 UTC.
How severe is CVE-2021-21300?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 8.0 | CVSS 3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N | GitHub_M |
| High 7.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H | NVD |
| Medium 5.1 | CVSS 2.0 | AV:N/AC:H/Au:N/C:P/I:P/A:P | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2021-21300 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 90.8% probability of exploitation activity in the next 30 days, percentile 99.8 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-59 Improper Link Resolution Before File Access
Where are the vendor advisories and references?
- https://github.com/git/git/security/advisories/GHSA-8prw-h3cq-mghm
- https://lore.kernel.org/git/xmqqim6019yd.fsf%40gitster.c.googlers.com/
- https://git-scm.com/docs/git-config#Documentation/git-config.txt-coresymlinks
- https://git-scm.com/docs/gitattributes#_filter
- https://github.com/git/git/commit/684dd4c2b414bcf648505e74498a608f28de4592
- [oss-security] 20210309 git: malicious repositories can execute remote code while cloning mailing-list
- FEDORA-2021-63fcbd126e vendor-advisory
- FEDORA-2021-ffd0b2108d vendor-advisory
- FEDORA-2021-03e61a6647 vendor-advisory
- https://support.apple.com/kb/HT212320
- 20210427 APPLE-SA-2021-04-26-10 Xcode 12.5 mailing-list
- GLSA-202104-01 vendor-advisory
- http://packetstormsecurity.com/files/163978/Git-LFS-Clone-Command-Execution.html
- [debian-lts-announce] 20221010 [SECURITY] [DLA 3145-1] git security update mailing-list
When was it published, and where is the official record?
- Reserved
- December 22, 2020
- Published
- March 9, 2021, 00:00 UTC
- CVE record updated
- August 3, 2024, 18:09 UTC by GitHub_M
- NVD
- Modified, last modified June 17, 2026, 03:35 UTC
- Last checked
- CVE list November 19, 2026, 07:15 UTC; NVD November 19, 2026, 08:03 UTC; KEV December 3, 2026, 17:39 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect git?
- Jul 8, 2025CVE-2025-48384 git: interpretation Conflict exploited
- Nov 16, 2026CVE-2026-111760 git: link following (a symlink lets an attacker reach other files)
- Nov 12, 2026CVE-2026-114467 Git: out-of-bounds write (memory corruption)
- Nov 12, 2026CVE-2026-114466 Git: insufficient Granularity of Access Control
- Nov 12, 2026CVE-2026-114469 Git: out-of-bounds read
- Nov 12, 2026CVE-2026-113408 Git: path traversal (reading or writing files outside the intended folder)
- Nov 10, 2026CVE-2026-105437 Git: heap buffer overflow
- Jul 8, 2025CVE-2025-48385 git: argument injection
Questions about CVE-2021-21300
Is CVE-2021-21300 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 17:39 UTC. FIRST's EPSS gives it a 90.8% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of git are affected by CVE-2021-21300?
git >= 2.14.2, < 2.17.62.17.6, git >= 2.18.0, < 2.18.5, git >= 2.19.0, < 2.19.6, git >= 2.20.0, < 2.20.5, git >= 2.21.0, < 2.21.4, git >= 2.22.0, < 2.22.5 and 8 more, per the CVE record by GitHub_M. The tables above give every range the sources list.
Which version fixes CVE-2021-21300?
2.17.6, 2.18.5, 2.19.6, 2.20.5, 2.21.4 and 2.22.5, per the NVD. Check the vendor's advisory before you rely on it.
How severe is CVE-2021-21300?
High (8.0, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2021-21300?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.