Git LFS can execute a Git binary from the current directory on Windows
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-426.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| git-lfs | git-lfs | before 2.13.2 | 2.13.2 | Patch available | CNA |
| — | github.com/git-lfs/git-lfs (Go) | before 2.13.2 | 2.13.2 | Patch available | GHSA-cx3w-xqmc-84g5 |
- git-lfs Vendorgit-lfs Affected before 2.13.2 Fixed in 2.13.2 Patch available CNA
- github.com/git-lfs/git-lfs (Go) Vendor— Affected before 2.13.2 Fixed in 2.13.2 Patch available GHSA-cx3w-xqmc-84g5
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:git_large_file_storage_project:git_large_file_storage:*:*:*:*:*:*:*:* | before 2.13.2 | Vulnerable | Git Large File Storage Project |
- cpe:2.3:a:git_large_file_storage_project:git_large_file_storage:*:*:*:*:*:*:*:* Versions before 2.13.2 Vulnerable ·Git Large File Storage Project
Remediation
- Fix · CNA git-lfs (git-lfs) Fixed in 2.13.2
- Fix · GHSA-cx3w-xqmc-84g5 github.com/git-lfs/git-lfs (Go) Fixed in 2.13.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-21237
- 2026-10-03 Alias added: GHSA-cx3w-xqmc-84g5
References
Advisory 4
More git-lfs vulnerabilities
- TI-2025-19562 Git LFS may write to arbitrary files via crafted symlinks CVSS 4.0HIGH 8.6
- TI-2024-35726 Git LFS permits exfiltration of credentials via crafted HTTP URLs CVSS 4.0HIGH 8.5
Sources
- CVE-2021-21237 · CVE Program
- CVE-2021-21237 · NVD
- FIRST EPSS
- GHSA-cx3w-xqmc-84g5 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences