cve.bz

CVE-2021-21300 Link Following

7.5 highExploitEPSS 91%Fix available

High (7.5). EPSS 91% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
91% (unchanged from 89% a week ago; 89% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-59 Improper Link Resolution Before File Access (Link Following)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-21300 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-21300?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-21300?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-21300 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
git-scm:gitthrough 2.14.2
git-scm:gitfrom 2.17.0 before 2.17.6
git-scm:gitfrom 2.18.0 before 2.18.5
git-scm:gitfrom 2.19.0 before 2.19.6
git-scm:gitfrom 2.20.0 before 2.20.5
git-scm:gitfrom 2.21.0 before 2.21.4
git-scm:gitfrom 2.22.0 before 2.22.5
git-scm:gitfrom 2.23.0 before 2.23.4
git-scm:gitfrom 2.24.0 before 2.24.4
git-scm:gitfrom 2.25.0 before 2.25.5
git-scm:gitfrom 2.26.0 before 2.26.3
git-scm:gitfrom 2.29.0 before 2.29.3
git-scm:gitfrom 2.30.0 before 2.30.2
git-scm:git2.27.0
git-scm:git2.28.0
fedoraproject:fedora32
fedoraproject:fedora33
fedoraproject:fedora34
apple:xcodebefore 12.5
debian:debian_linux10.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10git1:2.20.1-2+deb10u4DLA-3145-1
Debian12, 13, 14git1:2.30.2-1DEBIAN-CVE-2021-21300
Ubuntu16.04:LTSgit1:2.7.4-0ubuntu1.10UBUNTU-CVE-2021-21300 USN-4761-1
Ubuntu18.04:LTSgit1:2.17.1-1ubuntu0.8UBUNTU-CVE-2021-21300 USN-4761-1
Ubuntu20.04:LTSgit1:2.25.1-1ubuntu3.1UBUNTU-CVE-2021-21300 USN-4761-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 12 moregit2.26.2-3.31.1SUSE-SU-2021:0757-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP2-LTSS and 14 moregit2.26.2-27.43.1SUSE-SU-2021:0756-1
SUSELinux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Development Tools 15 SP3git2.31.1-10.3.1SUSE-SU-2021:2555-1
openSUSELeap 15.2git2.26.2-lp152.2.6.1openSUSE-SU-2021:0405-1
openSUSELeap 15.3git2.31.1-10.3.1openSUSE-SU-2021:2555-1
openSUSETumbleweedgit2.33.0-1.3openSUSE-SU-2024:10786-1
openSUSETumbleweedgit-annex8.20210903-1.2openSUSE-SU-2024:10787-1
Alpinev3.10git2.22.5-r0ALPINE-CVE-2021-21300
Alpinev3.11git2.24.4-r0ALPINE-CVE-2021-21300
Alpinev3.12git2.26.3-r0ALPINE-CVE-2021-21300
Alpinev3.13, v3.14, v3.15 and 9 moregit2.30.2-r0ALPINE-CVE-2021-21300

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability affects case-insensitive file systems, therefore typical Linux scenarios should be safe. However, as per upstream, exploitation is even possible on Linux under certain circumstances.

Red Hat CodeReady Studio 12 is not affected by this flaw because Jboss Forge Addon uses jgit which is a different (Java) git implementation than git itself.

In RHEL-8.6 and above, we currently provide git-2.31.x and later versions, which are not impacted by CVE-2021-21300. The vulnerability affects versions prior git-2.30.1.

Red Hat's mitigation

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.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6gitOut of support scope
Red Hat Enterprise Linux 7gitOut of support scope
Red Hat Enterprise Linux 8gitNot affected
Red Hat Enterprise Linux 9gitNot affected
Red Hat OpenShift Container Platform 3.11jenkins-2-pluginsNot affected
Red Hat OpenShift Container Platform 4jenkins-2-pluginsNot affected
Red Hat Software Collectionsrh-git218-gitWill not fix
Red Hat Software Collectionsrh-git227-gitWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-21300.

Public exploits

Attack patterns (CAPEC)

  • CAPEC-17 Using Malicious Files Likelihood: High · Severity: Very High
  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-132 Symlink Attack Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON