CVE-2021-21300: malicious repositories can execute remote code while cloning
Noroxi assessment
Priority: This week (action score 60/100)
- A ready-made attack module is public (Metasploit); exploiting it takes no special expertise.
- A ready-made attack tool exists and the flaw can be exploited over the network without an account, so priority is at least “This week”.
- Probability of exploitation in the next 30 days: 88.5% (FIRST EPSS); higher than 99.7% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. A user must open a link or visit a page. Special conditions such as timing or configuration are required.
- Fixed version: git (Alpine:v3.10) 2.22.5-r0; git (Alpine:v3.11) 2.24.4-r0; git (Alpine:v3.12) 2.26.3-r0.
Don’t wait for the next maintenance window. Upgrade to git (Alpine:v3.10) 2.22.5-r0; git (Alpine:v3.11) 2.24.4-r0; git (Alpine:v3.12) 2.26.3-r0 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Mar 9, 2021
- Updated
- Jun 16, 2026
- EPSS
- 88.5% · 99th percentile
- CWE
- CWE-59
Report tools
Action score
60
This week
Don’t wait for the next maintenance window.
- CVSS
- 30 / 40 · 7.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 27 / 30 · 88.5%
- Ready-made attack tool
- 3 / 60 · floor: at least 60
CNA vs NVD score
- NVD
- 7.5
- CNA · GitHub_M
- 8.0
- 0.5 point gap
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- Weaponized exploit exists
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| git-scm | git | cpe:2.3:a:git-scm:git |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| apple | xcode | cpe:2.3:a:apple:xcode |
| apple | macos | cpe:2.3:o:apple:macos |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- apple xcodebefore 12.5
- debian debian linux10.0
- fedoraproject fedora32
- fedoraproject fedora33
- fedoraproject fedora34
- git-scm git2.21.0 and later · before 2.21.4
- git-scm git2.22.0 and later · before 2.22.5
- git-scm git2.23.0 and later · before 2.23.4
- git-scm git2.24.0 and later · before 2.24.4
- git-scm git2.25.0 and later · before 2.25.5
- git-scm gitup to 2.14.2 inclusive
- git-scm git2.29.0 and later · before 2.29.3
- git-scm git2.30.0 and later · before 2.30.2
- git-scm git2.26.0 and later · before 2.26.3
- git-scm git2.17.0 and later · before 2.17.6
- git-scm git2.18.0 and later · before 2.18.5
- git-scm git2.19.0 and later · before 2.19.6
- git-scm git2.20.0 and later · before 2.20.5
- git-scm git2.27.0
- git-scm git2.28.0
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
git 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, >= 2.27.0, < 2.27.1, >= 2.28.0, < 2.28.1 … (+2)affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.10 | git | from 2.17.0 · before 2.22.5-r0 | 2.22.5-r0 |
| Alpine:v3.11 | git | from 2.17.0 · before 2.24.4-r0 | 2.24.4-r0 |
| Alpine:v3.12 | git | from 2.17.0 · before 2.26.3-r0 | 2.26.3-r0 |
| Alpine:v3.13 | git | from 2.17.0 · before 2.30.2-r0 | 2.30.2-r0 |
| Debian:10 | git | before 1:2.20.1-2+deb10u4 | 1:2.20.1-2+deb10u4 |
| Debian:12 | git | before 1:2.30.2-1 | 1:2.30.2-1 |
| openSUSE:Leap 15.2 | git | before 2.26.2-lp152.2.6.1 | 2.26.2-lp152.2.6.1 |
| openSUSE:Leap 15.3 | git | before 2.31.1-10.3.1 | 2.31.1-10.3.1 |
| openSUSE:Tumbleweed | git-annex | before 8.20210903-1.2 | 8.20210903-1.2 |
| SUSE:HPE Helion OpenStack 8 | git | before 2.26.2-27.43.1 | 2.26.2-27.43.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP2 | git | before 2.26.2-3.31.1 | 2.26.2-3.31.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | git | before 2.31.1-10.3.1 | 2.31.1-10.3.1 |
Same product
git-scm: all recordsOther highest-scoring records for the same primary product.
- CVE-2018-17456Git before 2.14.5, 2.15.x before 2.15.3, 2.16.x before 2.16.5, 2.17.x before 2.17.2, 2.18.x before 2.18.1, and 2.19.x before 2.19.1 allows r68This week
- CVE-2025-48384Git allows arbitrary code execution through broken config quotingKEV63This week
- CVE-2017-1000117A malicious third-party can give a crafted "ssh://..." URL to an unsuspecting victim, and an attempt to visit the URL can result in any prog60This week
Published before and after this one in the same product
- ← EarlierCVE-2019-1353Jan 24, 2020 · An issue was found in Git before v2.24.1, v2.23.1, v2.22.2, v2.21.1, v2.20.2, v2.19.3, v2.18.2, v2.17.3, v2.16.6, v2.15.4, and v2.14.6.40Plan
- ← EarlierCVE-2020-11008Apr 21, 2020 · Malicious URLs can still cause Git to send a stored credential to the wrong server31Monitor
- Later →CVE-2021-40330Aug 31, 2021 · git_connect_git in connect.c in Git before 2.30.1 allows a repository path to contain a newline character, which may result in unexpected cr31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:git | 2.22.5-r0 · Alpine:v3.10 | Package registry (OSV) |
| debian:git | 1:2.30.2-1 · Debian:12 | Package registry (OSV) |
| opensuse:git | 2.26.2-lp152.2.6.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:git-annex | 8.20210903-1.2 · openSUSE:Tumbleweed | Package registry (OSV) |
| suse:git | 2.26.2-27.43.1 · SUSE:HPE Helion OpenStack 8 | Package registry (OSV) |
Exploit status
Weaponized
A ready exploit tool or active in-the-wild use is known for this vulnerability. This should be your top priority.
Evidence
- Metasploit module ×1
- Proof-of-concept repository on GitHub ×14
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Metasploit module | exploit/multi/http/git_lfs_clone_command_execGit LFS Clone Command Execexploit | 2021-04-26 |
| Proof-of-concept repository on GitHub | stars:0 | 2021-03-10 |
| Proof-of-concept repository on GitHub | stars:0 | 2021-03-10 |
| Proof-of-concept repository on GitHub | stars:0 | 2021-03-10 |
| Proof-of-concept repository on GitHub | stars:1 | 2021-03-11 |
| Proof-of-concept repository on GitHub | stars:0 | 2021-03-11 |
| Proof-of-concept repository on GitHub | stars:0 | 2021-03-11 |
| Proof-of-concept repository on GitHub | stars:0 | 2021-03-15 |
| Proof-of-concept repository on GitHub | stars:0 | 2021-04-06 |
| Proof-of-concept repository on GitHub | stars:0 | 2021-04-07 |
| Proof-of-concept repository on GitHub | stars:0 | 2022-08-13 |
| Proof-of-concept repository on GitHub | stars:0 | 2023-05-04 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- Published
- First PoCsame day
- Metasploit+47 d
- TodayNov 6, 2026+2068 d
No history yet (it accumulates with the daily EPSS job).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- Special conditions such as timing or configuration are required.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-59 · Improper Link Resolution Before File Access ('Link Following')CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
- Obfuscated Files or Information: HTML SmugglingT1027.006
- Obfuscated Files or Information: Embedded PayloadsT1027.009
- Boot or Logon Autostart Execution:Shortcut ModificationT1547.009
- Hide Artifacts: Resource ForkingT1564.009
- Hijack Execution Flow: Executable Installer File Permissions WeaknessT1574.005
- Hijack Execution Flow: Services File Permissions WeaknessT1574.010
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (11 more)Show less
- git-scm.com/docs/git-config#Documentation/git-config.txt-coresymlinks
- git-scm.com/docs/gitattributes#_filter
- github.com/git/git/commit/684dd4c2b414bcf648505e74498a608f28de4592
- github.com/git/git/security/advisories/GHSA-8prw-h3cq-mghm
- lists.debian.org/debian-lts-announce/2022/10/msg00014.html
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BBPNGLQSYJHLZZ37BO42YY6S5OTIF4L4/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LCLJJLKKMS5WRFO6C475AOUZTWQLIARX/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LMXX2POK5X576BSDWSXGU7EIK6I72ERU/
- lore.kernel.org/git/xmqqim6019yd.fsf%40gitster.c.googlers.com/
- security.gentoo.org/glsa/202104-01
- support.apple.com/kb/HT212320
Vendor advisories and official records. Exploit/PoC links are deliberately left out.