GHSA-6635-c626-vj4r

    Dashboard / Vulnerabilities / GHSA-6635-c626-vj4r

    GHSA-6635-c626-vj4r

    Published: 1 Apr 2022Last Modified: 10 Sept 2026

    Summary: Command Injection Vulnerability with Mercurial in VCS

    Details: URLs and local file paths passed to the Mercurial (hg) APIs that are specially crafted can contain commands which are executed by Mercurial if it is installed on the host operating system. The `vcs` package uses the underly version control system, in this case `hg`, to implement the needed functionality. When `hg` is executed, argument strings are passed to `hg` in a way that additional flags can be set. The additional flags can be used to perform a command injection. Other version control systems with an implemented interface may also be vulnerable. The issue has been fixed in version 1.13.2. A work around is to sanitize data passed to the `vcs` package APIs to ensure it does not contain commands or unexpected data. This is important for user input data that is passed directly to the package APIs.

    Affected packages

    Package

    Name: github.com/Masterminds/vcs

    Purl: pkg:golang/github.com/Masterminds/vcs

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -1.13.2

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-6635-c626-vj4r | CVE-DB