CVE-2022-21235
CRITICAL 9.8CVSS 3.1Command Injection Vulnerability with Mercurial in VCS
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.
- Published
- 1 Apr 2022
- Last modified
- 10 Sep 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-77CWE-88
- Also known as
- GHSA-6635-c626-vj4rGO-2022-0414SNYK-GOLANG-GITHUBCOMMASTERMINDSVCS-2437078
- Sources
- NVDJSONOSV GHSA-6635-c626-vj4rJSONOSV GO-2022-0414JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | vcs_project | vcscpe:2.3:a:vcs_project:vcs:*:*:*:*:*:go:*:* |
< 1.1.13 | 1.1.13 |
| OSV | Go | github.com/Masterminds/vcs | < 1.13.2 | 1.13.2 |
| OSV | Go | github.com/Masterminds/vcs | < 1.13.3 | 1.13.3 |
References
- https://github.com/Masterminds/vcs/pull/105 · Patch, Third Party Advisory, WEB, FIX
- https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMMASTERMINDSVCS-2437078 · Third Party Advisory, WEB
- https://github.com/Masterminds/vcs/security/advisories/GHSA-6635-c626-vj4r · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-21235 · ADVISORY
- https://github.com/Masterminds/vcs/commit/922a5122330ea8fbe56352a0172ddb6bf019cd22 · WEB
- https://github.com/Masterminds/vcs · PACKAGE
- https://github.com/Masterminds/vcs/releases/tag/v1.13.2 · WEB
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 1 Apr 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 1 Jul 2022)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 1 Apr 2022)