GHSA-x5c7-x7m2-rhmf: Go.mozilla.org/sops/v3 Local Directory Executable Lookup Vulnerability
LOWGHSA-x5c7-x7m2-rhmf is a LOW local directory executable lookup vulnerability (General Security Weakness) affecting Go.mozilla.org/sops/v3 libraries in the Go ecosystem. The issue involves local directory executable lookup in sops (windows-only). Remediation is available by upgrading affected packages to version 3.7.1.
GHSA-x5c7-x7m2-rhmf at a Glance
How to Fix GHSA-x5c7-x7m2-rhmf
To remediate this vulnerability, upgrade all affected Go.mozilla.org/sops/v3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade go.mozilla.org/sops/v3 to 3.7.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for go.mozilla.org/sops/v3
How to Check if You Are Affected
To determine whether your application is affected by GHSA-x5c7-x7m2-rhmf, inspect your project dependencies for Go.mozilla.org/sops/v3:
inspect dependencies for go.mozilla.org/sops/v3
Analyze the terminal output to locate any version of Go.mozilla.org/sops/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.7.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Go.mozilla.org/sops/v3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-x5c7-x7m2-rhmf Affected Go.mozilla.org/sops/v3 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
go.mozilla.org/sops/v3
|
Go |
< 3.7.1
|
3.7.1
|
References
Frequently Asked Questions
What is GHSA-x5c7-x7m2-rhmf?
Which Go.mozilla.org/sops/v3 versions are affected?
What version fixes GHSA-x5c7-x7m2-rhmf?
Is go.mozilla.org/sops/v3 affected?
What CWE is associated with GHSA-x5c7-x7m2-rhmf?
How can I check Go dependencies for GHSA-x5c7-x7m2-rhmf?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x5c7-x7m2-rhmf",
"modified" : "2021-05-20T16:50:13Z",
"published" : "2021-05-20T16:50:34Z",
"aliases" : [ ],
"summary" : "Local directory executable lookup in sops (Windows-only)",
"details" : "### Impact\nWindows users using the sops direct editor option (`sops file.yaml`) can have a local executable named either `vi`, `vim`, or `nano` executed if running sops from `cmd.exe`\n\nThis attack is only viable if an attacker is able to place a malicious binary within the directory you are running sops from. As well, this attack will only work when using `cmd.exe` or the Windows C library [SearchPath function](https://docs.microsoft.com/en-us/windows/win32/api/processenv/nf-processenv-searchpatha). This is a result of these Windows tools including `.` within their `PATH` by default.\n\n**If you are using sops within untrusted directories on Windows via `cmd.exe`, please upgrade immediately** \n\n**As well, if you have `.` within your default $PATH, please upgrade immediately.**\n\nMore information can be found on the official Go blog: https://blog.golang.org/path-security\n\n### Patches\nThe problem has been resolved in v3.7.1\n\nNow, if Windows users using cmd.exe run into this issue, a warning message will be printed:\n`vim resolves to executable in current directory (.\\vim.exe)`\n\n### References\n* https://blog.golang.org/path-security\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open a discussion in [sops](https://github.com/mozilla/sops/discussions)",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "go.mozilla.org/sops/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.7.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mozilla/sops/security/advisories/GHSA-x5c7-x7m2-rhmf"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-20T16:50:13Z",
"nvd_published_at" : null
}
}