GHSA-4G4P-42WC-9F3M
Vulnerability from github – Published: 2022-02-11 23:39 – Updated: 2022-04-20 16:25Impact
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 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.12.1, which will be released in coordination with this security advisory.
Workarounds
Other than avoiding untrusted repositories, there is no workaround.
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.12.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2020-27955"
],
"database_specific": {
"cwe_ids": [
"CWE-427"
],
"github_reviewed": true,
"github_reviewed_at": "2021-05-21T22:10:31Z",
"nvd_published_at": "2020-11-05T15:15:00Z",
"severity": "CRITICAL"
},
"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 occurs because on Windows, Go includes (and prefers) the current directory when the name of a command run does not contain a directory separator.\n\n### Patches\nThis version should be patched in v2.12.1, which will be released in coordination with this security advisory.\n\n### Workarounds\nOther than avoiding untrusted repositories, there is no workaround.\n\n### For more information\nIf you have any questions or comments about this advisory:\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`.\n",
"id": "GHSA-4g4p-42wc-9f3m",
"modified": "2022-04-20T16:25:04Z",
"published": "2022-02-11T23:39:18Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/git-lfs/git-lfs/security/advisories/GHSA-4g4p-42wc-9f3m"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-27955"
},
{
"type": "PACKAGE",
"url": "https://github.com/git-lfs/git-lfs"
},
{
"type": "WEB",
"url": "https://github.com/git-lfs/git-lfs/releases"
},
{
"type": "WEB",
"url": "https://legalhackers.com/advisories/Git-LFS-RCE-Exploit-CVE-2020-27955.html"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2020/Nov/1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Git LFS can execute a Git binary from the current directory"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.