{"id":"GHSA-x5c7-x7m2-rhmf","aliases":["GHSA-x5c7-x7m2-rhmf","GO-2022-0410"],"related":[],"kind":"vulnerability","state":"published","title":"Local directory executable lookup in sops (Windows-only)","summary":"### 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)","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### 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)","format":"markdown","source":"ghsa"},{"lang":"en","text":"Local directory executable lookup in sops (Windows-only) in go.mozilla.org/sops","format":"markdown","source":"go"}],"published":"2021-05-20T16:50:34.000Z","modified":"2026-03-03T04:52:10.110Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"LOW"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"LOW"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.7.1"}],"ecosystem":"Go","package":"go.mozilla.org/sops/v3","purl":"pkg:golang/go.mozilla.org/sops/v3","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"go.mozilla.org/sops","purl":"pkg:golang/go.mozilla.org/sops","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.7.1"}],"ecosystem":"Go","package":"go.mozilla.org/sops/v3","purl":"pkg:golang/go.mozilla.org/sops/v3","source":"go"}],"references":[{"url":"https://github.com/mozilla/sops/security/advisories/GHSA-x5c7-x7m2-rhmf","tags":["advisory","web"],"sources":["ghsa","go"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x5c7-x7m2-rhmf","url":"https://github.com/advisories/GHSA-x5c7-x7m2-rhmf","licence":"CC-BY-4.0","modified":"2024-08-21T15:42:05.145Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0410","url":"https://pkg.go.dev/vuln/GO-2022-0410","licence":"CC-BY-4.0","modified":"2026-03-03T04:52:10.110Z"}],"updatedAt":"2026-11-25T22:56:23.092Z"}