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

- Severity: High 7.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 41% of CVEs (2026-12-01)
- Published: 2021-01-15T17:36:09.000Z
- Modified: 2026-09-08T08:47:33.038Z
- Also known as: GHSA-cx3w-xqmc-84g5, BIT-GIT-LFS-2021-21237, GO-2021-0098
- Weaknesses: CWE-94, CWE-426
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- git-lfs git-lfs: < 2.13.2
- github.com/git-lfs/git-lfs (Go): before 2.13.2; before 1.5.1-0.20210113180018-fc664697ed2c
- git_large_file_storage_project git_large_file_storage: before 2.13.2
- git-lfs (Bitnami): before 2.13.2

## Every score

- GitHub_M: CVSS:3.1 7.2 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`
- GitHub: CVSS:3.1 7.2 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 4.6 Medium `AV:L/AC:L/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating High

## References

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

## Sources

- CVE List: [CVE-2021-21237](https://www.cve.org/CVERecord?id=CVE-2021-21237), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-cx3w-xqmc-84g5](https://github.com/advisories/GHSA-cx3w-xqmc-84g5), CC-BY-4.0, modified 2026-07-08
- Go Vulnerability Database: [GO-2021-0098](https://pkg.go.dev/vuln/GO-2021-0098), CC-BY-4.0, modified 2024-05-20
- NVD: [CVE-2021-21237](https://nvd.nist.gov/vuln/detail/CVE-2021-21237), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-GIT-LFS-2021-21237](https://osv.dev/vulnerability/BIT-GIT-LFS-2021-21237), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-21237 · Whole record: https://cve.day/CVE-2021-21237.json · Rebuilt by cve.day 2026-11-25T22:57:59.487Z
