Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. go.mozilla.org/sops/v3
  4. ›
  5. GMS-2021-107

GMS-2021-107: Local directory executable lookup in sops (Windows-only)

May 20, 2021

Impact

Windows 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

This 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. This is a result of these Windows tools including . within their PATH by default.

If you are using sops within untrusted directories on Windows via cmd.exe, please upgrade immediately

As well, if you have . within your default $PATH, please upgrade immediately.

More information can be found on the official Go blog: https://blog.golang.org/path-security

Patches

The problem has been resolved in v3.7.1

Now, if Windows users using cmd.exe run into this issue, a warning message will be printed: vim resolves to executable in current directory (.\vim.exe)

References

  • https://blog.golang.org/path-security

For more information

If you have any questions or comments about this advisory:

  • Open a discussion in sops

References

  • github.com/advisories/GHSA-x5c7-x7m2-rhmf
  • github.com/mozilla/sops/security/advisories/GHSA-x5c7-x7m2-rhmf

Code Behaviors & Features

Detect and mitigate GMS-2021-107 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.7.1

Fixed versions

  • 3.7.1

Solution

Upgrade to version 3.7.1 or above.

Source file

go/go.mozilla.org/sops/v3/GMS-2021-107.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:41 +0000.