// For flags

CVE-2021-21300

malicious repositories can execute remote code while cloning

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

12
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

Git es un sistema de control de revisiones distribuido de código abierto. En las versiones afectadas de Git, un repositorio especialmente diseñado que contiene enlaces simbólicos, así como archivos que usan un filtro clean/smudge como Git LFS, puede hacer que se ejecute un script recién extraído mientras se clona en un sistema de archivos que no distingue entre mayúsculas y minúsculas como NTFS , HFS+ o APFS (es decir, los sistemas de archivos predeterminados en Windows y macOS). Tome en cuenta que los filtros de clean/smudge deben ser configurados para eso. Git para Windows configura Git LFS por defecto y, por lo tanto, es vulnerable. El problema se ha corregido en las versiones publicadas el martes 9 de marzo de 2021. Como solución temporal, si el soporte de enlace simbólico está deshabilitado en Git (por ejemplo, por medio de "git config --global core.symlinks false"), el ataque descrito no funcionará. Del mismo modo, si no se configuran globalmente filtros clean/smudge como Git LFS (es decir,_before_ cloning), el ataque se frustra. Como siempre, es mejor evitar la clonación de repositorios de fuentes no confiables. La primera versión afectada es 2.14.2. Las versiones correctas son: 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

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None
Attack Vector
Network
Attack Complexity
High
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2020-12-22 CVE Reserved
  • 2021-03-09 CVE Published
  • 2021-03-10 First Exploit
  • 2024-08-03 CVE Updated
  • 2024-10-04 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')
CAPEC
References (24)
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Apple
Search vendor "Apple"
Xcode
Search vendor "Apple" for product "Xcode"
< 12.5
Search vendor "Apple" for product "Xcode" and version " < 12.5"
-
Affected
in Apple
Search vendor "Apple"
Macos
Search vendor "Apple" for product "Macos"
>= 11.0
Search vendor "Apple" for product "Macos" and version " >= 11.0"
-
Safe
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
<= 2.14.2
Search vendor "Git-scm" for product "Git" and version " <= 2.14.2"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.17.0 < 2.17.6
Search vendor "Git-scm" for product "Git" and version " >= 2.17.0 < 2.17.6"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.18.0 < 2.18.5
Search vendor "Git-scm" for product "Git" and version " >= 2.18.0 < 2.18.5"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.19.0 < 2.19.6
Search vendor "Git-scm" for product "Git" and version " >= 2.19.0 < 2.19.6"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.20.0 < 2.20.5
Search vendor "Git-scm" for product "Git" and version " >= 2.20.0 < 2.20.5"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.21.0 < 2.21.4
Search vendor "Git-scm" for product "Git" and version " >= 2.21.0 < 2.21.4"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.22.0 < 2.22.5
Search vendor "Git-scm" for product "Git" and version " >= 2.22.0 < 2.22.5"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.23.0 < 2.23.4
Search vendor "Git-scm" for product "Git" and version " >= 2.23.0 < 2.23.4"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.24.0 < 2.24.4
Search vendor "Git-scm" for product "Git" and version " >= 2.24.0 < 2.24.4"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.25.0 < 2.25.5
Search vendor "Git-scm" for product "Git" and version " >= 2.25.0 < 2.25.5"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.26.0 < 2.26.3
Search vendor "Git-scm" for product "Git" and version " >= 2.26.0 < 2.26.3"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.29.0 < 2.29.3
Search vendor "Git-scm" for product "Git" and version " >= 2.29.0 < 2.29.3"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
>= 2.30.0 < 2.30.2
Search vendor "Git-scm" for product "Git" and version " >= 2.30.0 < 2.30.2"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
2.27.0
Search vendor "Git-scm" for product "Git" and version "2.27.0"
-
Affected
Git-scm
Search vendor "Git-scm"
Git
Search vendor "Git-scm" for product "Git"
2.28.0
Search vendor "Git-scm" for product "Git" and version "2.28.0"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
32
Search vendor "Fedoraproject" for product "Fedora" and version "32"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
33
Search vendor "Fedoraproject" for product "Fedora" and version "33"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
34
Search vendor "Fedoraproject" for product "Fedora" and version "34"
-
Affected
Debian
Search vendor "Debian"
Debian Linux
Search vendor "Debian" for product "Debian Linux"
10.0
Search vendor "Debian" for product "Debian Linux" and version "10.0"
-
Affected