Vulnerability Details : CVE-2021-21300
Public exploit exists!
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.
Products affected by CVE-2021-21300
- cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
- cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:2.27.0:*:*:*:*:*:*:*
- cpe:2.3:a:git-scm:git:2.28.0:*:*:*:*:*:*:*
Exploit prediction scoring system (EPSS) score for CVE-2021-21300
75.02%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 99 %
Percentile, the proportion of vulnerabilities that are scored at or less
Metasploit modules for CVE-2021-21300
-
Git LFS Clone Command Exec
Disclosure Date: 2021-04-26First seen: 2022-12-23exploit/multi/http/git_lfs_clone_command_execGit clients that support delay-capable clean / smudge filters and symbolic links on case-insensitive file systems are vulnerable to remote code execution while cloning a repository. Usage of clean / smudge filters through Git LFS and a case-insensi
CVSS scores for CVE-2021-21300
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
5.1
|
MEDIUM | AV:N/AC:H/Au:N/C:P/I:P/A:P |
4.9
|
6.4
|
NIST | |
7.5
|
HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
1.6
|
5.9
|
NIST | |
8.0
|
HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N |
1.6
|
5.8
|
GitHub, Inc. |
CWE ids for CVE-2021-21300
-
The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.Assigned by:
- nvd@nist.gov (Secondary)
- security-advisories@github.com (Primary)
References for CVE-2021-21300
-
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LCLJJLKKMS5WRFO6C475AOUZTWQLIARX/
[SECURITY] Fedora 33 Update: git-2.30.2-1.fc33 - package-announce - Fedora Mailing-ListsThird Party Advisory
-
https://lore.kernel.org/git/xmqqim6019yd.fsf@gitster.c.googlers.com/
[ANNOUNCE] Git v2.30.2 and below for CVE-2021-21300 - Junio C HamanoRelease Notes;Third Party Advisory
-
https://github.com/git/git/security/advisories/GHSA-8prw-h3cq-mghm
malicious repositories can execute remote code while cloning · Advisory · git/git · GitHubThird Party Advisory
-
http://packetstormsecurity.com/files/163978/Git-LFS-Clone-Command-Execution.html
Git LFS Clone Command Execution ≈ Packet StormExploit;Third Party Advisory;VDB Entry
-
https://support.apple.com/kb/HT212320
About the security content of Xcode 12.5 - Apple SupportThird Party Advisory
-
http://www.openwall.com/lists/oss-security/2021/03/09/3
oss-security - git: malicious repositories can execute remote code while cloningExploit;Mailing List;Third Party Advisory
-
http://seclists.org/fulldisclosure/2021/Apr/60
Full Disclosure: APPLE-SA-2021-04-26-10 Xcode 12.5Mailing List;Third Party Advisory
-
https://security.gentoo.org/glsa/202104-01
Git: User-assisted execution of arbitrary code (GLSA 202104-01) — Gentoo securityThird Party Advisory
-
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LMXX2POK5X576BSDWSXGU7EIK6I72ERU/
[SECURITY] Fedora 32 Update: git-2.26.3-2.fc32 - package-announce - Fedora Mailing-ListsMailing List;Third Party Advisory
-
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BBPNGLQSYJHLZZ37BO42YY6S5OTIF4L4/
[SECURITY] Fedora 34 Update: git-2.30.2-1.fc34 - package-announce - Fedora Mailing-ListsMailing List;Third Party Advisory
-
https://git-scm.com/docs/git-config#Documentation/git-config.txt-coresymlinks
Git - git-config DocumentationVendor Advisory
-
https://github.com/git/git/commit/684dd4c2b414bcf648505e74498a608f28de4592
checkout: fix bug that makes checkout follow symlinks in leading path · git/git@684dd4c · GitHubPatch;Third Party Advisory
-
https://git-scm.com/docs/gitattributes#_filter
Git - gitattributes DocumentationVendor Advisory
-
https://lists.debian.org/debian-lts-announce/2022/10/msg00014.html
[SECURITY] [DLA 3145-1] git security updateMailing List;Third Party Advisory
Jump to