CVE-2022-21235
mediumpriority · track · 40EPSS 0.016 · 75 %ileDEEUUSEPSS · scored 2026-10-27
The package github.com/masterminds/vcs before 1.13.3 are vulnerable to Command Injection via argument injection. 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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–critical · 6.8–9.8
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (5)
Products and version ranges known to be affected.
advisories (3)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2023-2067Red Hat OpenStack: Schwachstelle ermöglicht CodeausführungDeutsch2023-08-15csaf · cert_bundDE
Ein entfernter, anonymer Angreifer kann eine Schwachstelle in Red Hat OpenStack ausnutzen, um beliebigen Programmcode auszuführen.
- GHSA-6635-c626-vj4rCommand Injection Vulnerability with Mercurial in VCS2022-04-01ghsa · osvUS
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.
- GO-2022-0414Command injection in github.com/Masterminds/vcs2022-07-01vendor · osvUS
Passing untrusted inputs to VCS functions can permit an attacker to execute arbitrary commands. The vcs package executes version control commands with user-provided arguments. These arguments can be interpreted as command-line flags, which can be used to perform command injection.
also known as (6)
Other names and identifiers for this entity.
- CNNVD-202204-1807cnnvd
- EUVD-2022-1643enisa_euvd
- GHSA-6635-c626-vj4renisa_euvd
- GHSA-6635-c626-vj4rosv
- GO-2022-0414osv
- SNYK-GOLANG-GITHUBCOMMASTERMINDSVCS-2437078osv
sources
Which sources assert this record, and when.
references (9)
External citations — patches, advisories, analysis.
- https://cxsecurity.com/cveshow/CVE-2022-21235/cnnvd
- https://github.com/Masterminds/vcs/pull/105cnnvd
- https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMMASTERMINDSVCS-2437078cnnvd
- https://www.auscert.org.au/bulletins/ESB-2023.4082cnnvd
- https://www.auscert.org.au/bulletins/ESB-2023.4812cnnvd
- https://github.com/Masterminds/vcs/pull/105enisa_euvd
- https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMMASTERMINDSVCS-2437078enisa_euvd
- https://github.com/Masterminds/vcs/pull/105PatchThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan