Skip to content
Fencer Vulns
high 8.0

CVE-2021-21300 in the critical feed json

malicious repositories can execute remote code while cloning

published 2021-03-09 5 y ago modified 2026-06-17 4 mo ago also EUVD-2021-8658

cvss
8.0
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
88.5%
EPSS 88.5% chance of exploitation in 30 days, percentile 99.7%
public exploits
1
Metasploit

Summary

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.

Patch / fix

  • git-scm git 2.17.6, 2.18.5, 2.19.6, 2.20.5, 2.21.4, 2.22.5, 2.23.4, 2.24.4, 2.25.5, 2.26.3, 2.29.3, 2.30.2
  • apple xcode 12.5
  • git Debian 14, Debian 13, Debian 12 1:2.30.2-1

debian advisories DEBIAN-CVE-2021-21300

  • git Ubuntu 16.04 LTS 1:2.7.4-0ubuntu1.10
  • git Ubuntu 18.04 LTS 1:2.17.1-1ubuntu0.8
  • git Ubuntu 20.04 LTS 1:2.25.1-1ubuntu3.1

ubuntu advisories UBUNTU-CVE-2021-21300

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • git SLE Module for Development Tools 15 SP3, SLE Module for Basesystem 15 SP3 2.31.1-10.3.1
  • git SLES for SAP 15 SP1, SLES for SAP 15, SLES 15-LTSS +12 more 2.26.2-3.31.1
  • git SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES for SAP 12 SP3 +14 more 2.26.2-27.43.1

suse advisories SUSE-SU-2021:2555-1SUSE-SU-2021:0757-1SUSE-SU-2021:0756-1

  • git openSUSE Tumbleweed 2.33.0-1.3
  • git-annex openSUSE Tumbleweed 8.20210903-1.2
  • git openSUSE Leap 15.3 2.31.1-10.3.1
  • git openSUSE Leap 15.2 2.26.2-lp152.2.6.1

opensuse advisories openSUSE-SU-2024:10786-1openSUSE-SU-2024:10787-1openSUSE-SU-2021:2555-1openSUSE-SU-2021:0405-1

  • git Alpine 3.10 2.22.5-r0
  • git Alpine 3.11 2.24.4-r0
  • git Alpine 3.12 2.26.3-r0
  • git Alpine 3.24, Alpine 3.23, Alpine 3.22 +9 more 2.30.2-r0

alpine advisories ALPINE-CVE-2021-21300

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • git Arch Linux 2.30.2-1

arch linux advisories AVG-1665

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-21300 updated cvss 7.5

git: remote code execution during clone operation on case-insensitive filesystems

  • Red Hat Enterprise Linux 6 git, gitk, gitweb, git-all, git-cvs, git-gui, +6 more Red Hat Enterprise Linux 7 git, gitk, git-hg, git-p4, gitweb, git-all, +12 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Software Collections rh-git218-git, rh-git227-git, rh-git218-gitk, rh-git227-gitk, rh-git218-git-p4, rh-git218-gitweb, +25 more
    affected: workaround, no fix planned “Will not fix”
  • Red Hat Enterprise Linux 8 git, gitk, gitweb, git-all, git-gui, git-svn, +8 more Red Hat Enterprise Linux 9 git, gitk, gitweb, git-all, git-gui, git-svn, +8 more Red Hat OpenShift Container Platform 3.11 jenkins-2-plugins Red Hat OpenShift Container Platform 4 jenkins-2-plugins
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Timeline

  1. Published
  2. First public exploit (Metasploit exploit/multi/http/git_lfs_clone_command_exec)

Exploit prediction

88.53% chance of exploitation in the next 30 days, higher than 99.7% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

CVSS scores

assigned by version score vector
CNA 3.1 8.0 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD 2.0 5.1 AV:N/AC:H/Au:N/C:P/I:P/A:P

Affected products

  • git git

Classification

Weakness
  • CWE-59 Improper Link Resolution Before File Access

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.