CVE-2021-21237
Git LFS vulnerability analysis and mitigation

Overview

CVE-2021-21237 is a critical security vulnerability affecting Git LFS on Windows systems. The vulnerability was discovered in January 2021 and is related to an incomplete fix for CVE-2020-27955. The issue affects Git LFS versions prior to 2.13.2, including implementations in software like SourceTree for Windows (versions up to 3.4.2) and Bamboo elastic agent AMI for Windows (versions up to 7.2.2) (GitHub Advisory, Atlassian KB).

Technical details

The vulnerability occurs because on Windows, Go includes and prefers the current directory when the name of a command run does not contain a directory separator. When Git LFS operates on a malicious repository containing a git.bat or git.exe file in the current directory, that program would be executed, allowing for arbitrary code execution. This security issue specifically affects Windows systems and does not impact Unix systems. The vulnerability has been assigned a CVSS score of 7.8 (High), with attack vector being Local, attack complexity Low, and requiring user interaction (GitHub Advisory).

Impact

If exploited, the vulnerability allows attackers to execute arbitrary commands on the target system through a malicious repository when Git LFS operations are performed. This could lead to complete system compromise with high impact on confidentiality, integrity, and availability of the affected system (GitHub Advisory).

Mitigation and workarounds

The vulnerability was patched in Git LFS version 2.13.2, SourceTree for Windows version 3.4.3, and Bamboo version 7.2.3. Users are strongly advised to upgrade to these or later versions. For users unable to upgrade immediately, the only workaround is to avoid untrusted repositories or use a different operating system (GitHub Advisory, Atlassian KB).

Additional resources


SourceThis report was generated using AI

Related Git LFS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2020-27955CRITICAL9.8
  • Git LFSGit LFS
  • git-lfs
NoYesNov 05, 2020
CVE-2025-26625HIGH8.6
  • Git LFSGit LFS
  • cpe:2.3:a:git_large_file_storage_project:git_large_file_storage
NoYesOct 17, 2025
CVE-2024-53263HIGH8.5
  • Rocky LinuxRocky Linux
  • github.com/git-lfs/git-lfs/v3
NoYesJan 14, 2025
CVE-2022-24826HIGH7.8
  • Git LFSGit LFS
  • cpe:2.3:a:git_large_file_storage_project:git_large_file_storage
NoYesApr 20, 2022
CVE-2021-21237HIGH7.8
  • Git LFSGit LFS
  • git-lfs
NoYesJan 15, 2021

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management