Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-21237

Git LFS is a command line extension for managing large files with Git. On Windows, if Git LFS operates on a malicious repository with a git.bat or git.exe file in the current directory, that program would be executed, permitting the attacker to execute arbitrary code. This does not affect Unix systems. This is the result of an incomplete fix for CVE-2020-27955. This issue occurs because on Windows, Go includes (and prefers) the current directory when the name of a command run does not contain a directory separator. Other than avoiding untrusted repositories or using a different operating system, there is no workaround. This is fixed in v2.13.2.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-21237
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:31 UTC · Revision 1

Source evidence

CVE-2021-21237

core-osv · Original source

Published 15 Jan 2021, 18:15 UTC

Git LFS is a command line extension for managing large files with Git. On Windows, if Git LFS operates on a malicious repository with a git.bat or git.exe file in the current directory, that program would be executed, permitting the attacker to execute arbitrary code. This does not affect Unix systems. This is the result of an incomplete fix for CVE-2020-27955. This issue occurs because on Windows, Go includes (and prefers) the current directory when the name of a command run does not contain a directory separator. Other than avoiding untrusted repositories or using a different operating system, there is no workaround. This is fixed in v2.13.2.

osv:CVE-2021-21237
Complete source record
{
  "id": "904c49e9fe06c37b0115659b3ea624553905534985e8807be3dd185247d5a342",
  "url": "https://osv.dev/vulnerability/CVE-2021-21237",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-21237",
    "summary": "Git LFS is a command line extension for managing large files with Git. On Windows, if Git LFS operates on a malicious repository with a git.bat or git.exe file in the current directory, that program would be executed, permitting the attacker to execute arbitrary code. This does not affect Unix systems. This is the result of an incomplete fix for CVE-2020-27955. This issue occurs because on Windows, Go includes (and prefers) the current directory when the name of a command run does not contain a directory separator. Other than avoiding untrusted repositories or using a different operating system, there is no workaround. This is fixed in v2.13.2.",
    "evidence": "osv:CVE-2021-21237",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-21237",
      "aliases": [
        "BIT-git-lfs-2021-21237",
        "CVE-2021-21237",
        "GHSA-cx3w-xqmc-84g5",
        "GO-2021-0098"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/git-lfs/git-lfs",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "fc664697ed2c2081ee9633010de0a7f9debea72a"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:git_large_file_storage_project:git_large_file_storage:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.13.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "fc664697ed2c2081ee9633010de0a7f9debea72a"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "fc664697ed2c2081ee9633010de0a7f9debea72a"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v2.13.2"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.13.1",
            "v2.13.0",
            "v2.12.0",
            "v2.11.0",
            "v2.10.0",
            "v2.9.0",
            "v2.8.0",
            "v2.7.0",
            "v2.5.0",
            "v2.4.0",
            "v2.3.4",
            "v2.3.1",
            "v2.3.0",
            "v2.2.0",
            "v2.1.0",
            "v2.0.2-rc1",
            "v2.0.0",
            "v1.5.0",
            "v1.4.3",
            "v1.4.4",
            "v1.4.2",
            "v1.4.1",
            "v1.4.0",
            "v1.3.1",
            "v1.3.0",
            "v1.2.0",
            "v1.1.1-pre-push-tracing",
            "v1.1.1",
            "v1.1.0",
            "v1.0.2",
            "v1.0.1",
            "v1.0.0",
            "v0.6.0",
            "v0.5.3",
            "v0.5.2",
            "v0.5.1",
            "v0.5.1-tracing",
            "v0.5.0",
            "v0.5.0.pre1",
            "v0.4.1",
            "v0.4.0",
            "v0.3.6",
            "v0.3.5",
            "v0.3.4",
            "v0.3.3",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.2.3",
            "v0.2.2",
            "v0.2.1",
            "v0.2.1-p1",
            "v0.2.0",
            "v0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21237.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:27.661609957Z",
      "provider": "osv",
      "references": [
        "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27955",
        "https://github.com/git-lfs/git-lfs/releases/tag/v2.13.2",
        "https://github.com/git-lfs/git-lfs/security/advisories/GHSA-cx3w-xqmc-84g5",
        "https://github.com/git-lfs/git-lfs/commit/fc664697ed2c2081ee9633010de0a7f9debea72a"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-21237",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 385375,
  "published_at": "2021-01-15T18:15:15.98+00:00"
}