NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
HIGH severity

CVE-2022-21235 — vcs

HIGHFix: Masterminds/vcs#105

CVE-2022-21235 is a high-severity (CVSS 8.1) CWE-88 vulnerability in github.com/Masterminds/vcs. A fix is available for github.com/Masterminds/vcs — see the affected versions and patch details below.

Command Injection

Also known asGHSA-6635-c626-vj4rGO-2022-0414SNYK-GOLANG-GITHUBCOMMASTERMINDSVCS-2437078
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 9, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs76th percentile — riskier than 76% of all scored CVEsHighest risk
0.00%0.77%1.55%2.32%0.7%1.6%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected
🐹github.com/Masterminds/vcs

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

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

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/Masterminds/vcsall versions1.13.2go get github.com/Masterminds/vcs@v1.13.2

Affected Products

1 product · 1 configurations
Application
vcsvcs_project
< 1.1.13
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/Masterminds/vcs, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/Masterminds/vcs to 1.13.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-21235 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

In Red Hat OpenStack, the 'github.com/Masterminds/vcs' is a transitive dependency and is not used by operators directly which reduces the chances for successful exploitation. Hence, the impact for OpenStack is reduced to moderate.

ProductFixed inAdvisory
Red Hat OpenShift Container Platform 4.11openshift4/ose-agent-installer-csr-approver-rhel8:v4.11.0-202307072028.p0.gaa46748.assembly.streamRHSA-2023:4053
Red Hat OpenStack Platform 16.2rhosp-rhel8/osp-director-operator:1.3.0-8RHSA-2023:4694
Red Hat OpenStack Platform 17.1 for RHEL 9rhosp-rhel9/osp-director-agent:1.3.1-10RHSA-2023:4582

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2022-21235 in your dependencies?

Find it across Go, including transitive dependencies.

CVE-2022-21235: vcs Command Injection — Fixed in 1.13.2