# CVE-2021-21237: Git LFS can execute a Git binary from the current directory on Windows

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.2
- **CVSS:** 7.2 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.45% (percentile 31, 2026-11-26)
- **CWE:** CWE-426
- **Aliases:** BIT-git-lfs-2021-21237, GHSA-cx3w-xqmc-84g5, GO-2021-0098
- **Published:** 2021-01-15T17:36:09.000Z
- **Modified:** 2026-07-08T06:29:13.454Z

## Who should check

- Projects that depend on Go package github.com/git-lfs/git-lfs (\< 2.13.2)
- Anyone running git-lfs \< 2.13.2

## Description

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.

## Affected and fixed versions

- Go `github.com/git-lfs/git-lfs`: affected \< 2.13.2; fixed 2.13.2, 1.5.1-0.20210113180018-fc664697ed2c (osv)
- git-lfs: \< 2.13.2 (cvelist)

## Mitigation

- Upgrade github.com/git-lfs/git-lfs to one of 2.13.2, 1.5.1-0.20210113180018-fc664697ed2c (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-21237. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-21237.md
Affected: github.com/git-lfs/git-lfs < 2.13.2
Fixed in: 2.13.2, 1.5.1-0.20210113180018-fc664697ed2c

Steps:
1. Search this machine and project for github.com/git-lfs/git-lfs (Go), git-lfs: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-21237 being exploited?

There is no confirmed exploitation: CVE-2021-21237 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.45% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-21237?

High: CVSS 7.2 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2021-21237?

github.com/git-lfs/git-lfs \< 2.13.2.

### Is there a fix for CVE-2021-21237?

Yes. Fixed in 2.13.2, 1.5.1-0.20210113180018-fc664697ed2c. Upgrade github.com/git-lfs/git-lfs to one of 2.13.2, 1.5.1-0.20210113180018-fc664697ed2c (or later in the same release line).

### How do I check if I'm affected by CVE-2021-21237?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/git-lfs/git-lfs/security/advisories/GHSA-cx3w-xqmc-84g5>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-21237>
- patch: <https://github.com/git-lfs/git-lfs/commit/fc664697ed2c2081ee9633010de0a7f9debea72a>
- other: <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27955>
- other: <https://github.com/git-lfs/git-lfs/releases/tag/v2.13.2>
- other: <https://github.com/git-lfs/git-lfs>
- other: <https://pkg.go.dev/vuln/GO-2021-0098>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-21237>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-cx3w-xqmc-84g5> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2021-0098> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-21237> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-21237>
