ghsa-cx3w-xqmc-84g5
Vulnerability from github
Impact
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.
Patches
This version should be patched in v2.13.2, which will be released in coordination with this security advisory.
Workarounds
Other than avoiding untrusted repositories or using a different operating system, there is no workaround.
References
Are there any links users can visit to find out more?
For more information
If you have any questions or comments about this advisory:
- Start a discussion in the Git LFS discussion page.
- If you cannot open a discussion, please email the core team using their usernames at
github.com
.
{ "affected": [ { "package": { "ecosystem": "Go", "name": "github.com/git-lfs/git-lfs" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.13.2" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2021-21237" ], "database_specific": { "cwe_ids": [ "CWE-426", "CWE-94" ], "github_reviewed": true, "github_reviewed_at": "2021-05-21T17:37:52Z", "nvd_published_at": null, "severity": "HIGH" }, "details": "### Impact\nOn 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.\n\nThis is the result of an incomplete fix for CVE-2020-27955.\n\nThis 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](https://github.com/golang/go/issues/38736).\n\n### Patches\nThis version should be patched in v2.13.2, which will be released in coordination with this security advisory.\n\n### Workarounds\nOther than avoiding untrusted repositories or using a different operating system, there is no workaround.\n\n### References\n_Are there any links users can visit to find out more?_\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n- Start a discussion in [the Git LFS discussion page](https://github.com/git-lfs/git-lfs/discussions).\n- If you cannot open a discussion, please email the core team using their usernames at `github.com`.", "id": "GHSA-cx3w-xqmc-84g5", "modified": "2022-04-20T16:24:41Z", "published": "2022-02-15T00:30:37Z", "references": [ { "type": "WEB", "url": "https://github.com/git-lfs/git-lfs/security/advisories/GHSA-cx3w-xqmc-84g5" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-21237" }, { "type": "WEB", "url": "https://github.com/git-lfs/git-lfs/commit/fc664697ed2c2081ee9633010de0a7f9debea72a" }, { "type": "WEB", "url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27955" }, { "type": "PACKAGE", "url": "https://github.com/git-lfs/git-lfs" }, { "type": "WEB", "url": "https://github.com/git-lfs/git-lfs/releases/tag/v2.13.2" }, { "type": "WEB", "url": "https://pkg.go.dev/vuln/GO-2021-0098" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N", "type": "CVSS_V3" } ], "summary": "Git LFS can execute a Git binary from the current directory on Windows" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.