CVE-2021-21300 (CNNVD-202103-640)

HIGH
中文标题:
Git 后置链接漏洞
英文标题:
malicious repositories can execute remote code while cloning
CVSS分数: 8.0
发布时间: 2021-03-09 00:00:00
漏洞类型: 后置链接
状态: PUBLISHED
数据质量分数: 0.30
数据版本: v3
漏洞描述
中文描述:

Git是一套免费、开源的分布式版本控制系统。 Git 存在后置链接漏洞,该漏洞允许攻击者利用特别制作的存储库导致just-checked脚本执行而克隆到一个不区分大小写的文件系统。

英文描述:

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.

CWE类型:
CWE-59
标签:
(暂无数据)
受影响产品
厂商 产品 版本 版本范围 平台 CPE
git git >= 2.14.2, < 2.17.62.17.6 - - cpe:2.3:a:git:git:>=_2.14.2,_<_2.17.62.17.6:*:*:*:*:*:*:*
git git >= 2.18.0, < 2.18.5 - - cpe:2.3:a:git:git:>=_2.18.0,_<_2.18.5:*:*:*:*:*:*:*
git git >= 2.19.0, < 2.19.6 - - cpe:2.3:a:git:git:>=_2.19.0,_<_2.19.6:*:*:*:*:*:*:*
git git >= 2.20.0, < 2.20.5 - - cpe:2.3:a:git:git:>=_2.20.0,_<_2.20.5:*:*:*:*:*:*:*
git git >= 2.21.0, < 2.21.4 - - cpe:2.3:a:git:git:>=_2.21.0,_<_2.21.4:*:*:*:*:*:*:*
git git >= 2.22.0, < 2.22.5 - - cpe:2.3:a:git:git:>=_2.22.0,_<_2.22.5:*:*:*:*:*:*:*
git git >= 2.23.0, < 2.23.4 - - cpe:2.3:a:git:git:>=_2.23.0,_<_2.23.4:*:*:*:*:*:*:*
git git >= 2.24.0, < 2.24.4 - - cpe:2.3:a:git:git:>=_2.24.0,_<_2.24.4:*:*:*:*:*:*:*
git git >= 2.25.0, < 2.25.5 - - cpe:2.3:a:git:git:>=_2.25.0,_<_2.25.5:*:*:*:*:*:*:*
git git >= 2.26.0, < 2.26.3 - - cpe:2.3:a:git:git:>=_2.26.0,_<_2.26.3:*:*:*:*:*:*:*
git git >= 2.27.0, < 2.27.1 - - cpe:2.3:a:git:git:>=_2.27.0,_<_2.27.1:*:*:*:*:*:*:*
git git >= 2.28.0, < 2.28.1 - - cpe:2.3:a:git:git:>=_2.28.0,_<_2.28.1:*:*:*:*:*:*:*
git git >= 2.29.0, < 2.29.3 - - cpe:2.3:a:git:git:>=_2.29.0,_<_2.29.3:*:*:*:*:*:*:*
git git >= 2.30.0, < 2.30.1 - - cpe:2.3:a:git:git:>=_2.30.0,_<_2.30.1:*:*:*:*:*:*:*
git-scm git * - - 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 * - - cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:*
debian debian_linux 10.0 - - cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
解决方案
中文解决方案:
(暂无数据)
英文解决方案:
(暂无数据)
临时解决方案:
(暂无数据)
参考链接
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
[oss-security] 20210309 git: malicious repositories can execute remote code while cloning mailing-list
cve.org
访问
FEDORA-2021-63fcbd126e vendor-advisory
cve.org
访问
FEDORA-2021-ffd0b2108d vendor-advisory
cve.org
访问
FEDORA-2021-03e61a6647 vendor-advisory
cve.org
访问
无标题 OTHER
cve.org
访问
20210427 APPLE-SA-2021-04-26-10 Xcode 12.5 mailing-list
cve.org
访问
GLSA-202104-01 vendor-advisory
cve.org
访问
无标题 OTHER
cve.org
访问
[debian-lts-announce] 20221010 [SECURITY] [DLA 3145-1] git security update mailing-list
cve.org
访问
CVSS评分详情
3.1 (cna)
HIGH
8.0
CVSS向量: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
机密性
HIGH
完整性
HIGH
可用性
NONE
时间信息
发布时间:
2021-03-09 00:00:00
修改时间:
2024-08-03 18:09:15
创建时间:
2025-11-11 15:36:37
更新时间:
2025-11-11 15:56:40
利用信息
暂无可利用代码信息
数据源详情
数据源 记录ID 版本 提取时间
CVE cve_CVE-2021-21300 2025-11-11 15:20:47 2025-11-11 07:36:37
NVD nvd_CVE-2021-21300 2025-11-11 14:57:34 2025-11-11 07:44:58
CNNVD cnnvd_CNNVD-202103-640 2025-11-11 15:10:36 2025-11-11 07:56:40
版本与语言
当前版本: v3
主要语言: EN
支持语言:
EN ZH
安全公告
暂无安全公告信息
变更历史
v3 CNNVD
2025-11-11 15:56:40
vulnerability_type: 未提取 → 后置链接; cnnvd_id: 未提取 → CNNVD-202103-640; data_sources: ['cve', 'nvd'] → ['cnnvd', 'cve', 'nvd']
查看详细变更
  • vulnerability_type: 未提取 -> 后置链接
  • cnnvd_id: 未提取 -> CNNVD-202103-640
  • data_sources: ['cve', 'nvd'] -> ['cnnvd', 'cve', 'nvd']
v2 NVD
2025-11-11 15:44:58
affected_products_count: 14 → 22; data_sources: ['cve'] → ['cve', 'nvd']
查看详细变更
  • affected_products_count: 14 -> 22
  • data_sources: ['cve'] -> ['cve', 'nvd']