CVE-2021-21237 Git LFS can execute a Git binary from the current directory on Windows
- 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.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| 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
| Product | Affected versions | Fixed 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
- github.com issue-tracking third-party-advisory vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com issue-tracking patch third-party-advisory
- cve.mitre.org issue-tracking third-party-advisory
- github.com issue-tracking third-party-advisory
- pkg.go.dev
- github.com
- github.com product
- Debian Security Tracker CVE-2021-21237 vendor-advisory
- ubuntu.com issue-tracking
- www.cve.org issue-tracking