CVE-2021-21300
malicious repositories can execute remote code while cloning
CVE-2021-21300 is a symlink following in rusbitech-astra Astra Linux Special Edition (CVSS 8.0, High).
Public exploit available. Not confirmed exploited in the wild yet. Fixed in 12.5.
Public exploit: 2 sourcesFix12.5Upgrade to this build
e.g. OID 1.3.6.1.4.1.25623.1.0.844861
What to do
Find your product and version, then upgrade to the build on the right.
- GitAffected: >= 2.14.2, < 2.17.62.17.6Upgrade to: not statedAffected: >= 2.18.0, < 2.18.5Upgrade to: not statedAffected: >= 2.19.0, < 2.19.6Upgrade to: not statedAffected: >= 2.20.0, < 2.20.5Upgrade to: not stated + 10 more branchesStated by: CVE record
- Apple XcodeAffected: < 12.5Upgrade to: 12.5Stated by: NVD
- RusBITech-Astra Astra Linux Special EditionAffected: 1.6 «Smolensk»Upgrade to: not statedStated by: BDU
- Microsoft Corp Microsoft Visual Studio 2019Affected: from 16.0 before 16.3 inclusiveUpgrade to: not statedStated by: BDU
- Microsoft Corp Microsoft Visual Studio 2017Affected: from 15.0 before 15.8 inclusiveUpgrade to: not statedStated by: BDU
Versions as the sources state them. Full version matrix after sign-in
Steps
Written by AI from the record- Check your Git version with
git --versionand check if your team uses Visual Studio 2017/2019 or Xcode for Git operations. - On Windows or macOS, cloning untrusted repositories is the main risk — avoid cloning repos from sources you don't trust until patched.
- Update Git to version 2.30.1 (or the matching fixed version for your branch, e.g. 2.29.3, 2.28.1, 2.27.1).
- Update Xcode to version 12.5 if your team uses it for Git.
- As a stopgap, run
git config --global core.symlinks falseand remove any global Git LFS / clean-smudge filter configuration until you can update.
What it is
From the CVE record
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.
In plain language
Written by AI from the recordA booby-trapped Git repository can run malicious code on your computer the moment you clone it on Windows or Mac — if your team clones code from untrusted sources, update Git (fixed version 2.30.1 or later for your branch) soon.
CWE-59 symlink-following flaw lets a malicious repository combine symlinks with clean/smudge filters (e.g. Git LFS) to achieve code execution during `git clone` on case-insensitive filesystems (NTFS, HFS+, APFS), affecting Git, Visual Studio 2017/2019, Xcode, and several Linux distro packages.
If you're affected
- Developer machine takeover
- Source code tampering
- Supply-chain compromise
- Malware deployed via code review
Exploitation
Where each signal puts this CVE on the scale from published to confirmed exploited.
- CISA KEV
Not in the catalog. CISA has not confirmed exploitation.
- Public exploits
2 sources with a proof of concept or module.
Exploit links, PoCs and Metasploit modules after sign-in- EPSS
91% chance of exploitation activity in the next 30 days, which ranks it in the 99th percentile of scored CVEs.
Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.
Lifecycle
The patch came 471 days before any public exploit.
- EPSS band changehigh → criticalepss band change
- OpenVAS check added
- Public exploit / PoCsource: packetstorm
- Patch availablerecord updated
- Publishedweakness classified, att&ck mapped
Affected products
And 1 more affected product. See all after sign-in
Technical detail
CVSS 3.1 vector
Open in the CVSS calculatorCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N
Scored 8.0 by NVD.
How it is reached
- Attack Vector NetworkExploitable remotely over the network without any special conditions
- Attack Complexity HighRequires specific conditions like a race condition or non-default configuration
- Privileges Required NoneNo authentication required — anyone can exploit this
- User Interaction RequiredA user must click a link, open a file, or perform some action
Scope
- Scope ChangedThe exploit can affect other components (e.g. sandbox escape, host compromise from VM)
Impact if exploited
- Confidentiality HighTotal information disclosure — all data in the component is compromised
- Integrity HighTotal loss of integrity — attacker can modify any data in the component
- Availability NoneNo availability impact
Weaknesses
ATT&CK techniques
Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.
Sources
References in the record
- msrc.microsoft.com/update-guide/vulnerability/CVE-2021-21300&
- cybersecurity-help.cz/vdb/SB2021030943
- packetstormsecurity.com/files/163978/Git-LFS-Clone-Command-Execution.html
And 14 more references. See all after sign-in
Questions about CVE-2021-21300
- Is CVE-2021-21300 being exploited?
- Not confirmed. Public exploit code exists (2 sources), but CVE-2021-21300 is not in CISA KEV. EPSS puts the chance of exploitation in the next 30 days at 91%.
- Which versions are affected by CVE-2021-21300?
- Astra Linux Special Edition: 1.6 «Smolensk». Git: >= 2.14.2, < 2.17.62.17.6; >= 2.18.0, < 2.18.5; >= 2.19.0, < 2.19.6. Xcode: < 12.5. 2 more products are listed in the record.
- How do I fix or mitigate CVE-2021-21300?
- Upgrade to 12.5 or later. The advisory is on security.gentoo.org.
Last updated
Related articles
All articlesWatch the software you run.
My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.
We'll flag the next CVE, public exploit or patch for RusBITech-Astra, not every advisory. This one: public exploit.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI