Read the docs
TI-2021-04400 Aliases CVE-2021-21300

malicious repositories can execute remote code while cloning

Priority HIGH 77CWE-59Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
High · High · None
Fix status
Partial Red Hat: 3 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat.

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.

Why it matters now

EPSS 0.88533 99th percentileScored 2026-11-07
Public exploit Yes 2 exploit referencesTagged by NVD
Fix Partial git (git): 2.17.62.17.6, 2.18.5, 2.19.6 +11Red Hat: 3 without a fix

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
Gitgit2.14.2 to before 2.17.62.17.6; 2.18.0 to before 2.18.5; 2.19.0 to before 2.19.6; 2.20.0 to before 2.20.5; 2.21.0 to before 2.21.4; 2.22.0 to before 2.22.5; 2.23.0 to before 2.23.4; 2.24.0 to before 2.24.4; 2.25.0 to before 2.25.5; 2.26.0 to before 2.26.3; 2.27.0 to before 2.27.1; 2.28.0 to before 2.28.1; 2.29.0 to before 2.29.3; 2.30.0 to before 2.30.12.17.62.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.27.1, 2.28.1, 2.29.3, 2.30.1Patch availableCNA
  • git VendorGit Affected 2.14.2 to before 2.17.62.17.6; 2.18.0 to before 2.18.5; 2.19.0 to before 2.19.6; 2.20.0 to before 2.20.5; 2.21.0 to before 2.21.4; 2.22.0 to before 2.22.5; 2.23.0 to before 2.23.4; 2.24.0 to before 2.24.4; 2.25.0 to before 2.25.5; 2.26.0 to before 2.26.3; 2.27.0 to before 2.27.1; 2.28.0 to before 2.28.1; 2.29.0 to before 2.29.3; 2.30.0 to before 2.30.1 Fixed in 2.17.62.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.27.1, 2.28.1, 2.29.3, 2.30.1 Patch available CNA

CPE configurations NVD · 9

CPEVersionsRoleVendor
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*up to 2.14.2; 2.17.0 to before 2.17.6; 2.18.0 to before 2.18.5; 2.19.0 to before 2.19.6; 2.20.0 to before 2.20.5; 2.21.0 to before 2.21.4; 2.22.0 to before 2.22.5; 2.23.0 to before 2.23.4; 2.24.0 to before 2.24.4; 2.25.0 to before 2.25.5; 2.26.0 to before 2.26.3; 2.29.0 to before 2.29.3; 2.30.0 to before 2.30.2VulnerableGit-scm
cpe:2.3:a:git-scm:git:2.27.0:*:*:*:*:*:*:*2.27.0VulnerableGit-scm
cpe:2.3:a:git-scm:git:2.28.0:*:*:*:*:*:*:*2.28.0VulnerableGit-scm
cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*32VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*33VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*34VulnerableFedoraproject
cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:*before 12.5VulnerableApple
cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:*11.0Running onApple
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*10.0VulnerableDebian
  • cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* Versions up to 2.14.2; 2.17.0 to before 2.17.6; 2.18.0 to before 2.18.5; 2.19.0 to before 2.19.6; 2.20.0 to before 2.20.5; 2.21.0 to before 2.21.4; 2.22.0 to before 2.22.5; 2.23.0 to before 2.23.4; 2.24.0 to before 2.24.4; 2.25.0 to before 2.25.5; 2.26.0 to before 2.26.3; 2.29.0 to before 2.29.3; 2.30.0 to before 2.30.2 Vulnerable ·Git-scm
  • cpe:2.3:a:git-scm:git:2.27.0:*:*:*:*:*:*:* Versions 2.27.0 Vulnerable ·Git-scm
  • cpe:2.3:a:git-scm:git:2.28.0:*:*:*:*:*:*:* Versions 2.28.0 Vulnerable ·Git-scm
  • cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:* Versions 32 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* Versions 33 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject
  • cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:* Versions before 12.5 Vulnerable ·Apple
  • cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:* Versions 11.0 Running on ·Apple
  • cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian

Remediation

  • Fix · CNA git (git) Fixed in 2.17.62.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.27.1, 2.28.1, 2.29.3, 2.30.1

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Enterprise Linux 6AffectedNo fix planned: Out of support scope
Red Hat Enterprise Linux 7AffectedNo fix planned: Out of support scope
Red Hat Software CollectionsAffectedNo fix planned: Will not fix
Not affected: 4 products
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • Red Hat OpenShift Container Platform 3.11
  • Red Hat OpenShift Container Platform 4

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-21300

References

  • TI-2025-30709 Git allows arbitrary code execution through broken config quoting KEVCVSS 3.1HIGH 8.1
  • TI-2022-07580 gitattributes parsing integer overflow in git CVSS 3.1CRITICAL 9.8
  • TI-2022-20244 Integer overflow in `git archive`, `git log --format` leading to RCE in git CVSS 3.1CRITICAL 9.8
  • TI-2024-21101 Git's recursive clones on case-insensitive filesystems that support symlinks are susceptible to Remote Code Execution CVSS 3.1CRITICAL 9.1
  • TI-2023-10933 "git apply --reject" partially-controlled arbitrary file write CVSS 3.1HIGH 7.5
  • TI-2024-21116 Local Git clone may hardlink arbitrary user-readable files into the new repository's "objects/" directory CVSS 3.1HIGH 7.1
See all 31 →

Sources