# CVE-2022-21187: Command Injection

- Severity: High 8.1 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.69%, higher than 90% of CVEs (2026-12-01)
- Published: 2022-03-14T17:15:17.020Z
- Modified: 2026-07-01T20:23:11.167Z
- Also known as: GHSA-mv2w-4jqc-6fg4, PYSEC-2022-163, PYSEC-2026-563, SNYK-PYTHON-LIBVCS-2421204
- Weaknesses: CWE-74, CWE-77, CWE-88
- Assigned by: snyk

## Description

The package libvcs before 0.11.1 are vulnerable to Command Injection via argument injection. When calling the update_repo function (when using hg), the url parameter is passed to the hg clone command. By injecting some hg options it was possible to get arbitrary command execution.

(As written by CVE List.)

## Affected

- libvcs: from unspecified before 0.11.1
- libvcs (PyPI): before 0.11.1
- vcspull (PyPI): before 1.11.1
- libvcs_project libvcs: before 0.11.1

## Every score

- snyk: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.1 Critical `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`
- PyPA Advisory Database: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## References

- <https://snyk.io/vuln/SNYK-PYTHON-LIBVCS-2421204> (advisory, third-party-advisory, web)
- <https://github.com/vcs-python/libvcs/blob/v0.11.1/CHANGES%23libvcs-0111-2022-03-12> (release-notes, third-party-advisory, web)
- <https://github.com/vcs-python/libvcs/pull/306> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-21187> (advisory)
- <https://github.com/vcs-python/vcspull/commit/e1b77128a1fa0754625b5f43d8bc47956f21f33e> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/libvcs/PYSEC-2022-163.yaml> (web)
- <https://github.com/vcs-python/libvcs/blob/master/CHANGES#libvcs-0111-2022-03-12> (web)
- <https://github.com/vcs-python/vcspull/blob/master/CHANGES#vcspull-1111-2022-03-12> (web)
- <https://pypi.org/project/vcspull> (package)
- <https://github.com/advisories/GHSA-mv2w-4jqc-6fg4> (advisory)

## Sources

- CVE List: [CVE-2022-21187](https://www.cve.org/CVERecord?id=CVE-2022-21187), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-mv2w-4jqc-6fg4](https://github.com/advisories/GHSA-mv2w-4jqc-6fg4), CC-BY-4.0, modified 2026-06-29
- NVD: [CVE-2022-21187](https://nvd.nist.gov/vuln/detail/CVE-2022-21187), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-163](https://osv.dev/vulnerability/PYSEC-2022-163), CC-BY-4.0, modified 2026-06-29
- PyPA Advisory Database: [PYSEC-2026-563](https://osv.dev/vulnerability/PYSEC-2026-563), CC-BY-4.0, modified 2026-07-01

---

Page: https://cve.day/CVE-2022-21187 · Whole record: https://cve.day/CVE-2022-21187.json · Rebuilt by cve.day 2026-11-25T22:58:10.092Z
