CVE-2020-27955
Git LFS vulnerability analysis and mitigation

Overview

Git Large File Storage (Git LFS) version 2.12.0 and earlier contained a critical Remote Code Execution (RCE) vulnerability identified as CVE-2020-27955. The vulnerability was discovered by Dawid Golunski and disclosed on November 4, 2020. This security flaw affected Windows systems using Git LFS, impacting multiple popular Git clients including Git for Windows, GitHub CLI, GitHub Desktop, Visual Studio Code, GitKraken, SmartGit, and SourceTree in their default configurations (Legal Hackers Advisory).

Technical details

The vulnerability stems from Git LFS not specifying a full path to the git binary when executing a new git process via the ExecCommand() function in subprocess/subprocess_windows.go. Since Windows systems include the current directory in the exec.Command() implementation, attackers could exploit this by planting a malicious executable file named git.bat, git.exe, or git.cmd in the repository's main directory. This malicious file would then be executed instead of the legitimate git binary located in the trusted path (Legal Hackers Advisory).

Impact

The vulnerability could lead to a full system compromise as attackers could execute arbitrary commands remotely without the victim's knowledge. The attack vector was particularly concerning as it only required the victim to clone a malicious repository using common git version control tools. This affected various Windows systems, including Windows Server 2019 and Windows 10 Pro (Legal Hackers Advisory).

Mitigation and workarounds

The vulnerability was patched in Git LFS version 2.12.1. Due to the critical severity of the vulnerability, users and product vendors were advised to update to the latest git-lfs version as soon as possible. The fix involved properly specifying the full path to the git binary when executing new git processes (Legal Hackers Advisory).

Additional resources


SourceThis report was generated using AI

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