CVE-2021-21237

Git LFS can execute a Git binary from the current directory on Windows

HIGH
7.8
CVSS Score
Published: January 15, 2021 at 05:36 PM UTC
Updated: June 17, 2026 at 03:35 AM UTC
2 products affected across 2 vendorsGit Large File StorageLarge File Storage Project Git Large File Storage

Using git-lfs by git-lfs?

Get instant alerts when new vulnerabilities affect git-lfs - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.5%

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 2.13.2
Affected range stops below 2.13.2, so it looks safe — our inference, not a vendor statement
v < 2.13.2
Affected range stops below 2.13.2, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-426

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card