{"id":"CVE-2022-21235","aliases":["GHSA-6635-c626-vj4r","GO-2022-0414","SNYK-GOLANG-GITHUBCOMMASTERMINDSVCS-2437078"],"url":"https://o3.security/vulnerability/CVE-2022-21235","summary":"Command Injection","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.","published":"2022-04-01T15:55:10.738Z","modified":"2026-08-12T03:51:13.000112162Z","cvss":{"score":8.1,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/Masterminds/vcs","fixedVersion":"1.13.2"}],"fix":{"url":"https://github.com/Masterminds/vcs/pull/105","label":"Masterminds/vcs#105"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21235.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21235"},{"type":"ADVISORY","url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMMASTERMINDSVCS-2437078"},{"type":"FIX","url":"https://github.com/Masterminds/vcs/pull/105"},{"type":"WEB","url":"https://github.com/Masterminds/vcs/security/advisories/GHSA-6635-c626-vj4r"},{"type":"WEB","url":"https://github.com/Masterminds/vcs/commit/922a5122330ea8fbe56352a0172ddb6bf019cd22"},{"type":"PACKAGE","url":"https://github.com/Masterminds/vcs"},{"type":"WEB","url":"https://github.com/Masterminds/vcs/releases/tag/v1.13.2"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:13.000112162Z"}}