Skip to main content
Public proof of conceptFix available

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?

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
  1. 2021-03-0920:15CVE publishedNVD

Observed activity

isMalicious corpus · updated 2026-11-03 21:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block 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
Git-scm git
BranchAffectedFixed in
2.30≥ 2.30.0, < 2.30.22.30.2
2.29≥ 2.29.0, < 2.29.32.29.3
2.26≥ 2.26.0, < 2.26.32.26.3
2.25≥ 2.25.0, < 2.25.52.25.5
2.24≥ 2.24.0, < 2.24.42.24.4
2.23≥ 2.23.0, < 2.23.42.23.4
2.22≥ 2.22.0, < 2.22.52.22.5
2.21≥ 2.21.0, < 2.21.42.21.4
2.20≥ 2.20.0, < 2.20.52.20.5
2.19≥ 2.19.0, < 2.19.62.19.6
2.18≥ 2.18.0, < 2.18.52.18.5
2.17≥ 2.17.0, < 2.17.62.17.6
Fedoraproject fedora
BranchAffectedFixed in
32.x= 32no fix published
33.x= 33no fix published
34.x= 34no fix published
Apple xcodeversion to verify
BranchAffectedFixed in
12.5< 12.512.5

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

  • CVE-2021-21300 Red Hat Product Security67 known affected

    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

Full record on NVD

Fix

  1. 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
  2. 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…
  3. No fix planned, says the vendor Red Hat Product Security CVE-2021-21300 · 32 productsOut of support scope
  4. No fix planned, says the vendor Red Hat Product Security CVE-2021-21300 · 35 productsWill not fix

Advisories and patches

Detection

read 2026-11-03 22:42 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
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

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?

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.

Is CVE-2021-21300 actively exploited?

Active exploitation of CVE-2021-21300 has not been confirmed. Its EPSS score was 88.5% on 2026-11-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-21300?

CVE-2021-21300 has a CVSS v3 base score of 7.5 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H.

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

Sources for this record