CVE-2021-21300
published high CVSS 3.1 · 8.0malicious repositories can execute remote code while cloning
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| 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 · >= 2.29.0, < 2.29.3 · >= 2.30.0, < 2.30.1 | Affected | Not stated | GitHub_M |
| Amazon Linux | AL2 | Release evaluationALAS2-2021-1621 | Fixed | Not stated | Amazon Linux assessment |
| Alpine Linux | edge | git | Fixed | 2.30.2-r0 | Package fix record |
| Debian | buster | git | Advisory build | 1:2.20.1-2+deb10u4 | DLA-3145-1 |
| SUSE / openSUSE | SLE-12-SP2 | gitppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| Ubuntu | bionic | git | Advisory build | 1:2.17.1-1ubuntu0.8 | USN-4761-1 |
| Alpine Linux | v3.10 | git | Fixed | 2.22.5-r0 | Package fix record |
| Alpine Linux | v3.11 | git | Fixed | 2.24.4-r0 | Package fix record |
Show 94 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.12 | git | Fixed | 2.26.3-r0 | Package fix record |
| Alpine Linux | v3.13 | git | Fixed | 2.30.2-r0 | Package fix record |
| Alpine Linux | v3.14 | git | Fixed | 2.30.2-r0 | Package fix record |
| Alpine Linux | v3.15 | git | Fixed | 2.30.2-r0 | Package fix record |
| Alpine Linux | v3.16 | git | Fixed | 2.30.2-r0 | Package fix record |
| Alpine Linux | v3.17 | git | Fixed | 2.30.2-r0 | Package fix record |
| Alpine Linux | v3.18 | git | Fixed | 2.30.2-r0 | Package fix record |
| Alpine Linux | v3.19 | git | Fixed | 2.30.2-r0 | Package fix record |
| Alpine Linux | v3.20 | git | Fixed | 2.30.2-r0 | Package fix record |
| Alpine Linux | v3.21 | git | Fixed | 2.30.2-r0 | Package fix record |
| Alpine Linux | v3.22 | git | Fixed | 2.30.2-r0 | Package fix record |
| Alpine Linux | v3.23 | git | Fixed | 2.30.2-r0 | Package fix record |
| Alpine Linux | v3.24 | git | Fixed | 2.30.2-r0 | Package fix record |
| SUSE / openSUSE | SLE-12-SP2 | gits390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | gitx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | gitaarch64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | gitppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | gits390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | gitx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP4 | gitaarch64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP4 | gitppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP4 | gits390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP4 | gitx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP5 | gitaarch64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP5 | gitppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP5 | gits390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP5 | gitx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-15 | gitaarch64 | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15 | gitppc64le | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15 | gits390x | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15 | gitx86_64 | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15-SP1 | gitaarch64 | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15-SP1 | gitppc64le | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15-SP1 | gits390x | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15-SP1 | gitx86_64 | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15-SP2 | gitaarch64 | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15-SP2 | gitppc64le | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15-SP2 | gits390x | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15-SP2 | gitx86_64 | Advisory build | 2.26.2-3.31.1 | SUSE-SU-2021:0757-1 |
| SUSE / openSUSE | SLE-15-SP3 | gitaarch64 | Advisory build | 2.31.1-10.3.1 | SUSE-SU-2021:2555-1 |
| SUSE / openSUSE | SLE-15-SP3 | gitppc64le | Advisory build | 2.31.1-10.3.1 | SUSE-SU-2021:2555-1 |
| SUSE / openSUSE | SLE-15-SP3 | gits390x | Advisory build | 2.31.1-10.3.1 | SUSE-SU-2021:2555-1 |
| SUSE / openSUSE | SLE-15-SP3 | gitx86_64 | Advisory build | 2.31.1-10.3.1 | SUSE-SU-2021:2555-1 |
| SUSE / openSUSE | openSUSE-Leap-15.2 | giti586 | Advisory build | 2.26.2-lp152.2.6.1 | OPENSUSE-SU-2021:0405-1 |
| SUSE / openSUSE | openSUSE-Leap-15.2 | gitx86_64 | Advisory build | 2.26.2-lp152.2.6.1 | OPENSUSE-SU-2021:0405-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | gitaarch64 | Advisory build | 2.31.1-10.3.1 | OPENSUSE-SU-2021:2555-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | gitppc64le | Advisory build | 2.31.1-10.3.1 | OPENSUSE-SU-2021:2555-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | gits390x | Advisory build | 2.31.1-10.3.1 | OPENSUSE-SU-2021:2555-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | gitx86_64 | Advisory build | 2.31.1-10.3.1 | OPENSUSE-SU-2021:2555-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | gitaarch64 | Advisory build | 2.33.0-1.3 | OPENSUSE-SU-2024:10786-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | gitppc64le | Advisory build | 2.33.0-1.3 | OPENSUSE-SU-2024:10786-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | gits390x | Advisory build | 2.33.0-1.3 | OPENSUSE-SU-2024:10786-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | gitx86_64 | Advisory build | 2.33.0-1.3 | OPENSUSE-SU-2024:10786-1 |
| Ubuntu | focal | git | Advisory build | 1:2.25.1-1ubuntu3.1 | USN-4761-1 |
| Ubuntu | xenial | git | Advisory build | 1:2.7.4-0ubuntu1.10 | USN-4761-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-coreppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-cores390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-corex86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-cvsppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-cvss390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-cvsx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-daemonppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-daemons390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-daemonx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-docnoarch | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-emailppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-emails390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-emailx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-guippc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-guis390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-guix86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-svnppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-svns390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-svnx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-webppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-webs390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | git-webx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | gitkppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | gitks390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP2 | gitkx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-coreaarch64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-coreppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-cores390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-corex86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-cvsaarch64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-cvsppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-cvss390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-cvsx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-daemonaarch64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-daemonppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-daemons390x | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-daemonx86_64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-emailaarch64 | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
| SUSE / openSUSE | SLE-12-SP3 | git-emailppc64le | Advisory build | 2.26.2-27.43.1 | SUSE-SU-2021:0756-1 |
Package entries are limited to the first 100 builds and 100 linked advisories.
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.0 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| git | git | >= 2.14.2, < 2.17.62.17.6 (affected)>= 2.18.0, < 2.18.5 (affected)>= 2.19.0, < 2.19.6 (affected)>= 2.20.0, < 2.20.5 (affected)>= 2.21.0, < 2.21.4 (affected)>= 2.22.0, < 2.22.5 (affected)>= 2.23.0, < 2.23.4 (affected)>= 2.24.0, < 2.24.4 (affected)>= 2.25.0, < 2.25.5 (affected)>= 2.26.0, < 2.26.3 (affected)>= 2.27.0, < 2.27.1 (affected)>= 2.28.0, < 2.28.1 (affected)>= 2.29.0, < 2.29.3 (affected)>= 2.30.0, < 2.30.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-59 CWE-59 Improper Link Resolution Before File Access ('Link Following')
References
14- http://packetstormsecurity.com/files/163978/Git-LFS-Clone-Command-Execution.html
- 20210427 APPLE-SA-2021-04-26-10 Xcode 12.5 http://seclists.org/fulldisclosure/2021/Apr/60
- [oss-security] 20210309 git: malicious repositories can execute remote code while cloning http://www.openwall.com/lists/oss-security/2021/03/09/3
- 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
- https://github.com/git/git/security/advisories/GHSA-8prw-h3cq-mghm
- [debian-lts-announce] 20221010 [SECURITY] [DLA 3145-1] git security update https://lists.debian.org/debian-lts-announce/2022/10/msg00014.html
- FEDORA-2021-03e61a6647 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BBPNGLQSYJHLZZ37BO42YY6S5OTIF4L4/
- FEDORA-2021-63fcbd126e https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LCLJJLKKMS5WRFO6C475AOUZTWQLIARX/
- FEDORA-2021-ffd0b2108d https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LMXX2POK5X576BSDWSXGU7EIK6I72ERU/
- https://lore.kernel.org/git/xmqqim6019yd.fsf%40gitster.c.googlers.com/
- GLSA-202104-01 https://security.gentoo.org/glsa/202104-01
- https://support.apple.com/kb/HT212320
Provider assertions
2GitHub_M · cna
malicious repositories can execute remote code while cloning
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 8b580f00ae8a45a01901352d8d6ce7eabfe23404449dbf85ecb95b8d17290b64
- Ingested
- 23 Sep 2026, 07:52:31 UTC
- Source record
- Official CVE record