Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2021-21300

HIGH 8.0PoCEPSS 100%

malicious repositories can execute remote code while cloning

Mitigation

  • No fix listed yet: follow the vendor advisory.

Who should check

  • Anyone running git >= 2.14.2, < 2.17.62.17.6; >= 2.18.0, < 2.18.5; >= 2.19.0, < 2.19.6; >= 2.20.0, < 2.20.5; >= 2.21.0, < 2.21.4; >= 2.22.0, < 2.22.5; >= 2.23.0, < 2.23.4; >= 2.24.0, < 2.24.4; >= 2.25.0, < 2.25.5; >= 2.26.0, < 2.26.3; …

Vulnerability facts

Affected
git >= 2.14.2, < 2.17.62.17.6; >= 2.18.0, < 2.18.5; >= 2.19.0, < 2.19.6; >= 2.20.0, < 2.20.5; >= 2.21.0, < 2.21.4; >= 2.22.0, < 2.22.5; >= 2.23.0, < 2.23.4; >= 2.24.0, < 2.24.4; >= 2.25.0, < 2.25.5; >= 2.26.0, < 2.26.3; …
Fixed in
git 2.17.62.17.6, git 2.18.5, git 2.19.6, git 2.20.5, git 2.21.4, git 2.22.5, git 2.23.4, git 2.24.4, git 2.25.5, git 2.26.3
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
Yes: see the exploit references below
Remote exploitation
Remote, no login needed
CVSS
8.0 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: High
  • Privileges required: None
  • User interaction: Required
  • Scope: Changed (impact reaches other components)
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: None
EPSS
90.76% chance of exploitation in 30 days (percentile 100, 2026-11-26)
CWE
CWE-59
Published
Modified

Description

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.

Affected and fixed versions

Package / productAffectedFixedSource
git>= 2.14.2, < 2.17.62.17.6; >= 2.18.0, < 2.18.5; >= 2.19.0, < 2.19.6; >= 2.20.0, < 2.20.5; >= 2.21.0, < 2.21.4; >= 2.22.0, < 2.22.5; >= 2.23.0, < 2.23.4; >= 2.24.0, < 2.24.4; >= 2.25.0, < 2.25.5; >= 2.26.0, < 2.26.3; …—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2021-21300. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-21300.md
Affected: git >= 2.14.2, < 2.17.62.17.6; >= 2.18.0, < 2.18.5; >= 2.19.0, < 2.19.6; >= 2.20.0, < 2.20.5; >= 2.21.0, < 2.21.4; >= 2.22.0, < 2.22.5; >= 2.23.0, < 2.23.4; >= 2.24.0, < 2.24.4; >= 2.25.0, < 2.25.5; >= 2.26.0, < 2.26.3; …
Fixed in: git 2.17.62.17.6, git 2.18.5, git 2.19.6, git 2.20.5, git 2.21.4, git 2.22.5, git 2.23.4, git 2.24.4, git 2.25.5, git 2.26.3

Steps:
1. Search this machine and project for git: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2021-21300 being exploited?

There is no confirmed exploitation: CVE-2021-21300 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 90.76% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2021-21300?

High: CVSS 8.0 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2021-21300?

git >= 2.14.2, < 2.17.62.17.6; >= 2.18.0, < 2.18.5; >= 2.19.0, < 2.19.6; >= 2.20.0, < 2.20.5; >= 2.21.0, < 2.21.4; >= 2.22.0, < 2.22.5; >= 2.23.0, < 2.23.4; >= 2.24.0, < 2.24.4; >= 2.25.0, < 2.25.5; >= 2.26.0, < 2.26.3; ….

Is there a fix for CVE-2021-21300?

Yes. Fixed in git 2.17.62.17.6, git 2.18.5, git 2.19.6, git 2.20.5, git 2.21.4, git 2.22.5, git 2.23.4, git 2.24.4, git 2.25.5, git 2.26.3. No fix listed yet: follow the vendor advisory.

How do I check if I'm affected by CVE-2021-21300?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors