CVE-2021-21300
A public proof of concept exists; no exploitation attested.
- Published2021-03-09
- Fixed in2.30.2 · 2.29.3 · 2.26.3 · 2.25.5 · 2.24.4 · 2.23.4
- WeaknessCWE-59
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2021-03-0920:15CVE publishedNVD
Observed activity
isMalicious corpus · updated 2026-11-03 21:37 UTCBlock these indicators
- Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2021-21300?format=txt
- CSV export: https://api.ismalicious.com/edl/cve/CVE-2021-21300?format=csv
- TAXII collection of exploited CVEs
- The EDL and CSV take an API key on the Pro plan.
Versions per branch
NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 2.30 | ≥ 2.30.0, < 2.30.2 | 2.30.2 | NVD |
| 2.29 | ≥ 2.29.0, < 2.29.3 | 2.29.3 | NVD |
| 2.26 | ≥ 2.26.0, < 2.26.3 | 2.26.3 | NVD |
| 2.25 | ≥ 2.25.0, < 2.25.5 | 2.25.5 | NVD |
| 2.24 | ≥ 2.24.0, < 2.24.4 | 2.24.4 | NVD |
| 2.23 | ≥ 2.23.0, < 2.23.4 | 2.23.4 | NVD |
| 2.22 | ≥ 2.22.0, < 2.22.5 | 2.22.5 | NVD |
| 2.21 | ≥ 2.21.0, < 2.21.4 | 2.21.4 | NVD |
| 2.20 | ≥ 2.20.0, < 2.20.5 | 2.20.5 | NVD |
| 2.19 | ≥ 2.19.0, < 2.19.6 | 2.19.6 | NVD |
| 2.18 | ≥ 2.18.0, < 2.18.5 | 2.18.5 | NVD |
| 2.17 | ≥ 2.17.0, < 2.17.6 | 2.17.6 | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 32.x | = 32 | no fix published | NVD |
| 33.x | = 33 | no fix published | NVD |
| 34.x | = 34 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 12.5 | < 12.5 | 12.5 | NVD |
1 more product in the sources.
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- gitUbuntu:20.04:LTSall versions · fixed in 1:2.25.1-1ubuntu3.1
- gitUbuntu:18.04:LTSall versions · fixed in 1:2.17.1-1ubuntu0.8
- gitUbuntu:16.04:LTSall versions · fixed in 1:2.7.4-0ubuntu1.10
- gitSUSE:OpenStack Cloud Crowbar 9all versions · fixed in 2.26.2-27.43.1
- gitSUSE:OpenStack Cloud Crowbar 8all versions · fixed in 2.26.2-27.43.1
- gitSUSE:OpenStack Cloud 9all versions · fixed in 2.26.2-27.43.1
- gitSUSE:OpenStack Cloud 8all versions · fixed in 2.26.2-27.43.1
- gitSUSE:OpenStack Cloud 7all versions · fixed in 2.26.2-27.43.1
57 more package ranges on OSV.dev
Vendor advisories
git: remote code execution during clone operation on case-insensitive filesystems
emacs-git as a component of Red Hat Enterprise Linux 6 · emacs-git-el as a component of Red Hat Enterprise Linux 6 · git as a component of Red Hat Enterprise Linux 6 · +64 more
Fix
- Update Git-scm git to 2.30.2 · 2.29.3 · 2.26.3 · 2.25.5 · 2.24.4 · 2.23.4 · 2.22.5 · 2.21.4
- Workaround from the vendor Red Hat Product Security CVE-2021-21300 · 67 productsIf 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 repositor…
- No fix planned, says the vendor Red Hat Product Security CVE-2021-21300 · 32 productsOut of support scope
- No fix planned, says the vendor Red Hat Product Security CVE-2021-21300 · 35 productsWill not fix
Advisories and patches
- git-scm.comVendor Advisory
- git-scm.comVendor Advisory
- github.comPatch
Detection
read 2026-11-03 22:42 UTC- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof-of-concept repositories
- 14 repositories, unverifiedAlkenePan/CVE-2021-21300Faisal78123/CVE-2021-21300erranfenech/CVE-2021-21300Maskhe/CVE-2021-213001uanWu/CVE-2021-21300 PoC-in-GitHub
- Metasploit modules
- 1 moduleexploit/multi/http/git_lfs_clone_command_execrank: excellentModule metadata: Metasploit Framework, © Rapid7, Inc., BSD-3-Clause. Metasploit Framework
Sources
- CNACVSS 3.18known since 2026-10-23
- NVDCVSS 3.17.5read 2026-10-23
- NVDCVSS 2.05.1read 2026-10-23
- CNAweakness (CWE)CWE-59known since 2026-10-23
- NVDweakness (CWE)CWE-59read 2026-10-23
- FIRST EPSSEPSS score88.5 %read 2026-11-03
- PoC-in-GitHubproof of concept14read 2026-11-03
- Metasploit FrameworkMetasploit modules1known since 2026-11-01
- OSVaffected packages—
Identifiers
- EUVD-2021-8658same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- exploit/multi/http/git_lfs_clone_command_execexploit moduleMetasploit Framework © Rapid7 · BSD-3-Clause
- DLA-3145-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2021-0137advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2021-1105advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2021:0405-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2021:2555-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:10786-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:10787-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- SUSE-SU-2021:0756-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:0757-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:2555-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-4761-1advisory covering several CVEsUbuntu
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
- Published
- 2021-03-09
- Last Modified
- 2026-06-17
- NVD status
- Modified
Frequently asked questions
What is CVE-2021-21300?
Is CVE-2021-21300 actively exploited?
What is the CVSS score for CVE-2021-21300?
Running git? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- Metasploit Framework · BSD-3-Clause
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- PoC-in-GitHub · CC0-1.0
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0