CVE-2021-21300

Source
https://cve.org/CVERecord?id=CVE-2021-21300
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21300.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-21300
Downstream
Related
Published
2021-03-09T20:15:13.260Z
Modified
2026-04-16T04:35:00.022931657Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/git/git

Affected ranges

Type
GIT
Repo
https://github.com/git/git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
Fixed
Introduced
Fixed
Introduced
Fixed
Introduced
Fixed
Introduced
Fixed
Introduced
Fixed
Introduced
Fixed
Introduced
Fixed
Introduced
Fixed
Introduced
Fixed
Introduced
Fixed
Introduced
Fixed
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Fixed
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "last_affected": "2.14.2"
        },
        {
            "introduced": "2.17.0"
        },
        {
            "fixed": "2.17.6"
        },
        {
            "introduced": "2.18.0"
        },
        {
            "fixed": "2.18.5"
        },
        {
            "introduced": "2.19.0"
        },
        {
            "fixed": "2.19.6"
        },
        {
            "introduced": "2.20.0"
        },
        {
            "fixed": "2.20.5"
        },
        {
            "introduced": "2.21.0"
        },
        {
            "fixed": "2.21.4"
        },
        {
            "introduced": "2.22.0"
        },
        {
            "fixed": "2.22.5"
        },
        {
            "introduced": "2.23.0"
        },
        {
            "fixed": "2.23.4"
        },
        {
            "introduced": "2.24.0"
        },
        {
            "fixed": "2.24.4"
        },
        {
            "introduced": "2.25.0"
        },
        {
            "fixed": "2.25.5"
        },
        {
            "introduced": "2.26.0"
        },
        {
            "fixed": "2.26.3"
        },
        {
            "introduced": "2.29.0"
        },
        {
            "fixed": "2.29.3"
        },
        {
            "introduced": "2.30.0"
        },
        {
            "fixed": "2.30.2"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "2.27.0"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "2.28.0"
        }
    ]
}

Affected versions

v0.*
v0.99
v0.99.1
v0.99.2
v0.99.3
v0.99.4
v0.99.5
v0.99.6
v0.99.7
v0.99.8
v0.99.8a
v0.99.8b
v0.99.8c
v0.99.8d
v0.99.8e
v0.99.8f
v0.99.8g
v0.99.9a
v0.99.9b
v0.99.9c
v0.99.9d
v0.99.9e
v0.99.9f
v0.99.9g
v0.99.9h
v0.99.9i
v0.99.9j
v0.99.9k
v0.99.9l
v0.99.9m
v0.99.9n
v1.*
v1.0.0
v1.0rc1
v1.0rc2
v1.0rc3
v1.0rc4
v1.0rc5
v1.0rc6
v1.1.0
v1.2.0
v1.3.0-rc1
v1.4.1
v1.4.1-rc1
v1.4.1-rc2
v1.4.2
v1.4.2-rc1
v1.4.2-rc2
v1.4.2-rc3
v1.4.2-rc4
v1.4.3
v1.4.3-rc1
v1.4.3-rc2
v1.4.3-rc3
v1.4.4
v1.4.4-rc1
v1.4.4-rc2
v1.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12.0-rc2
v2.13.0
v2.13.0-rc0
v2.13.0-rc1
v2.13.0-rc2
v2.14.0
v2.14.0-rc0
v2.14.0-rc1
v2.14.1
v2.14.2
v2.17.0
v2.17.1
v2.17.2
v2.17.3
v2.17.4
v2.17.5
v2.18.0
v2.18.1
v2.18.2
v2.18.3
v2.18.4
v2.19.0
v2.19.1
v2.19.2
v2.19.3
v2.19.4
v2.19.5
v2.2.0
v2.2.0-rc0
v2.2.0-rc1
v2.2.0-rc2
v2.2.0-rc3
v2.20.0
v2.20.1
v2.20.2
v2.20.3
v2.20.4
v2.21.0
v2.21.1
v2.21.2
v2.21.3
v2.22.0
v2.22.1
v2.22.2
v2.22.3
v2.22.4
v2.23.0
v2.23.1
v2.23.2
v2.23.3
v2.24.0
v2.24.1
v2.24.2
v2.24.3
v2.25.0
v2.25.1
v2.25.2
v2.25.3
v2.25.4
v2.26.0
v2.26.1
v2.26.2
v2.27.0
v2.27.0-rc0
v2.27.0-rc1
v2.27.0-rc2
v2.28.0
v2.28.0-rc0
v2.28.0-rc1
v2.28.0-rc2
v2.29.0
v2.29.1
v2.29.2
v2.3.0
v2.3.0-rc0
v2.3.0-rc1
v2.3.0-rc2
v2.30.0
v2.30.1
v2.4.0
v2.4.0-rc0
v2.4.0-rc1
v2.4.0-rc2
v2.4.0-rc3
v2.5.0
v2.5.0-rc0
v2.5.0-rc1
v2.5.0-rc2
v2.5.0-rc3
v2.6.0
v2.6.0-rc0
v2.6.0-rc1
v2.6.0-rc2
v2.6.0-rc3
v2.7.0
v2.7.0-rc0
v2.7.0-rc1
v2.7.0-rc2
v2.7.0-rc3
v2.8.0
v2.8.0-rc0
v2.8.0-rc1
v2.8.0-rc2
v2.8.0-rc3
v2.8.0-rc4
v2.9.0
v2.9.0-rc0
v2.9.0-rc1
v2.9.0-rc2

Database specific

vanir_signatures_modified
"2026-04-11T23:33:55Z"
vanir_signatures
[
    {
        "id": "CVE-2021-21300-15a4833d",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "276677503004035957720297652347060290279",
                "194300041489366364803722943678753375976",
                "326368134096761905215852270671667464242",
                "255339043160293375611455199595722318847"
            ],
            "threshold": 0.9
        },
        "source": "https://github.com/git/git/commit/684dd4c2b414bcf648505e74498a608f28de4592",
        "deprecated": false,
        "target": {
            "file": "cache.h"
        },
        "signature_type": "Line"
    },
    {
        "id": "CVE-2021-21300-39a1bc57",
        "signature_version": "v1",
        "digest": {
            "function_hash": "249291322838791192183549209301243117633",
            "length": 606.0
        },
        "source": "https://github.com/git/git/commit/684dd4c2b414bcf648505e74498a608f28de4592",
        "deprecated": false,
        "target": {
            "function": "mingw_rmdir",
            "file": "compat/mingw.c"
        },
        "signature_type": "Function"
    },
    {
        "id": "CVE-2021-21300-54a4a911",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "52405788541650449857671201861593003433",
                "118767286671706823813543168271443044398",
                "294277434565854147747340188632148379712",
                "6269988942282923549050380572644560961"
            ],
            "threshold": 0.9
        },
        "source": "https://github.com/git/git/commit/684dd4c2b414bcf648505e74498a608f28de4592",
        "signature_type": "Line",
        "target": {
            "file": "compat/mingw.c"
        },
        "deprecated": false
    },
    {
        "id": "CVE-2021-21300-ee846581",
        "signature_version": "v1",
        "signature_type": "Line",
        "source": "https://github.com/git/git/commit/684dd4c2b414bcf648505e74498a608f28de4592",
        "deprecated": false,
        "target": {
            "file": "git-compat-util.h"
        },
        "digest": {
            "line_hashes": [
                "98106067658817072442339340836510065327",
                "266101509246156468219369285670669909114",
                "67565927279547095135265739457466178456"
            ],
            "threshold": 0.9
        }
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21300.json"
unresolved_ranges
[
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "32"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "33"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "34"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "fixed": "12.5"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "10.0"
            }
        ]
    }
]