Skip to content

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

HighCVSS 7.8 EPSS 0.45%
Published
Updated
Exploit status
No public exploit known
Technology
UbuntuDebian

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.

Upgrade path

5 packages: 2 fixed, 2 with no fix yet.

PackageAffectedFixed inStatus
ubuntu/git-lfs(Ubuntu 18.04) = 2.2.1-1; = 2.3.3-1; = 2.3.4-1; All versions No fix listed No fix yet
ubuntu/git-lfs(Ubuntu 20.04) = 2.8.0-4; = 2.9.0-1; = 2.9.1-1; = 2.9.2-1 +1 more No fix listed No fix yet
git large file storage project git large file storage < 2.13.2 2.13.2 Fixed
git-lfs github.com/git-lfs/git-lfs/v3(Go) < 1.5.1-0.20210113180018-fc664697ed2c; < 2.13.2 1.5.1-0.20210113180018-fc664697ed2c, 2.13.2 Fixed
git-lfs github.com/git-lfs/git-lfs/v3 = < 2.13.2 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
git-lfs github.com/git-lfs/git-lfs/v3(Go) < 2.13.2 2.13.2
git-lfs github.com/git-lfs/git-lfs/v3(Go) < 1.5.1-0.20210113180018-fc664697ed2c 1.5.1-0.20210113180018-fc664697ed2c
git large file storage project git large file storage < 2.13.2 2.13.2
git-lfs github.com/git-lfs/git-lfs/v3 = < 2.13.2 No fix listed
ubuntu/git-lfs(Ubuntu:18.04) All versions No fix listed
ubuntu/git-lfs(Ubuntu:18.04) = 2.2.1-1 No fix listed
ubuntu/git-lfs(Ubuntu:18.04) = 2.3.3-1 No fix listed
ubuntu/git-lfs(Ubuntu:18.04) = 2.3.4-1 No fix listed
ubuntu/git-lfs(Ubuntu:20.04) All versions No fix listed
ubuntu/git-lfs(Ubuntu:20.04) = 2.8.0-4 No fix listed
ubuntu/git-lfs(Ubuntu:20.04) = 2.9.0-1 No fix listed
ubuntu/git-lfs(Ubuntu:20.04) = 2.9.1-1 No fix listed
ubuntu/git-lfs(Ubuntu:20.04) = 2.9.2-1 No fix listed

References