CVE-2021-21300 | malicious repositories can execute remote code while cloning

Exp

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.

Published: 2021-03-09 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-21300 is rated High Exploit Risk (86.9/100): CVSS High severity, with high exploitation likelihood (EPSS 88.64%, 100th percentile). Core evidence: 2 public exploit reference(s) are indexed (Exploit-DB). EPSS rose +30.36% over the last day, indicating growing attacker interest. Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2021-21300

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2021-21300

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 58.28% 88.64% +30.36%
2 2026-06-08 61.88% 58.28% -3.60%
3 2026-05-10 61.88%

Full EPSS history (84 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-21300

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.0 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
1.6 5.8 [email protected]
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.6 5.9 [email protected]
5.1 2.0 MEDIUM
AV:N/AC:H/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:H)
Exploitation requires uncommon or highly specific conditions.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
4.9 6.4 [email protected]

Weakness enumeration for CVE-2021-21300

OS Trackers for CVE-2021-21300

vendor priority summary link
alpine high CVE-2021-21300: 1 source package rows (git); 41 state rows across 10 repos (3.10-main, 3.11-main, 3.12-main, 3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 11, open 30. https://security.alpinelinux.org/vuln/CVE-2021-21300
debian not yet assigned CVE-2021-21300 not yet assigned priority: Debian including 1 source packages (git), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2021-21300
gentoo normal CVE-2021-21300: 1 GLSA(s) (202104-01), 1 atom(s) (dev-vcs/git); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-21300
redhat medium https://access.redhat.com/security/cve/CVE-2021-21300
suse high CVE-2021-21300 severity important: SUSE including 148 source package names (1.16-13.3:git-core-2.31.1-10.3.1, 1.17-12.3:git-core-2.31.1-10.3.1, …), 625 product×package rows across 77 product lines (Container bci/golang, Container bci/node, … (77 product lines)): Fixed 529, Known Not Affected 96. https://www.suse.com/security/cve/CVE-2021-21300/
ubuntu medium CVE-2021-21300 medium priority: Ubuntu including 1 source packages (git), 6 status rows across 6 suites (bionic, focal, groovy, trusty, upstream, xenial): released 4, DNE 1, needs-triage 1. https://ubuntu.com/security/CVE-2021-21300

Affected software / configurations for CVE-2021-21300

Vendor Product Version Raw CPE
git-scm git <= 2.14.2 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.17.0, < 2.17.6 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.18.0, < 2.18.5 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.19.0, < 2.19.6 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.20.0, < 2.20.5 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.21.0, < 2.21.4 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.22.0, < 2.22.5 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.23.0, < 2.23.4 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.24.0, < 2.24.4 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.25.0, < 2.25.5 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.26.0, < 2.26.3 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.29.0, < 2.29.3 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git >= 2.30.0, < 2.30.2 cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
git-scm git 2.27.0 cpe:2.3:a:git-scm:git:2.27.0:*:*:*:*:*:*:*
git-scm git 2.28.0 cpe:2.3:a:git-scm:git:2.28.0:*:*:*:*:*:*:*
fedoraproject fedora 32 cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*
fedoraproject fedora 33 cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
fedoraproject fedora 34 cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
apple xcode < 12.5 cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*

References for CVE-2021-21300

URL Tags
http://packetstormsecurity.com/files/163978/Git-LFS-Clone-Command-Execution.html Exploit Third Party Advisory VDB Entry
http://seclists.org/fulldisclosure/2021/Apr/60 Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/03/09/3 Exploit Mailing List Third Party Advisory
https://git-scm.com/docs/git-config#Documentation/git-config.txt-coresymlinks Vendor Advisory
https://git-scm.com/docs/gitattributes#_filter Vendor Advisory
https://github.com/git/git/commit/684dd4c2b414bcf648505e74498a608f28de4592 Patch Third Party Advisory
https://github.com/git/git/security/advisories/GHSA-8prw-h3cq-mghm Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/10/msg00014.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BBPNGLQSYJHLZZ37BO42YY6S5OTIF4L4/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LCLJJLKKMS5WRFO6C475AOUZTWQLIARX/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LMXX2POK5X576BSDWSXGU7EIK6I72ERU/
https://lore.kernel.org/git/xmqqim6019yd.fsf%40gitster.c.googlers.com/
https://security.gentoo.org/glsa/202104-01 Third Party Advisory
https://support.apple.com/kb/HT212320 Third Party Advisory
cvelogic Threat Intelligence