CVE Tools

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.

Check it yourself

OpenVAS · 28 checks

e.g. OID 1.3.6.1.4.1.25623.1.0.844861

Run the check

Published Updated Sources: CVE.org, NVD, BDU

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
  1. Check your Git version with git --version and check if your team uses Visual Studio 2017/2019 or Xcode for Git operations.
  2. On Windows or macOS, cloning untrusted repositories is the main risk — avoid cloning repos from sources you don't trust until patched.
  3. 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).
  4. Update Xcode to version 12.5 if your team uses it for Git.
  5. As a stopgap, run git config --global core.symlinks false and 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 record

A 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.

EPSS99th
Public exploit
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.

  1. EPSS band changehigh → criticalepss band change
  2. OpenVAS check added
  3. Public exploit / PoCsource: packetstorm
  4. Patch availablerecord updated
  5. Publishedweakness classified, att&ck mapped

Affected products

And 1 more affected product. See all after sign-in

Technical detail

CVSS: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

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 articles

Watch 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.