{"id":"CVE-2022-21187","summary":"Command Injection","details":"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.","aliases":["GHSA-mv2w-4jqc-6fg4","PYSEC-2022-163","PYSEC-2026-563","SNYK-PYTHON-LIBVCS-2421204"],"modified":"2026-08-12T03:51:15.895131481Z","published":"2022-03-14T17:15:17.020Z","database_specific":{"cna_assigner":"snyk","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21187.json"},"references":[{"type":"WEB","url":"https://github.com/vcs-python/libvcs/blob/v0.11.1/CHANGES%23libvcs-0111-2022-03-12"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21187.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21187"},{"type":"ADVISORY","url":"https://snyk.io/vuln/SNYK-PYTHON-LIBVCS-2421204"},{"type":"FIX","url":"https://github.com/vcs-python/libvcs/pull/306"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/vcs-python/libvcs","events":[{"introduced":"0"},{"fixed":"f1e4c3b6a5019ccecff73ce78032a22c3804cbe6"}],"database_specific":{"source":["AFFECTED_FIELD","CPE_RANGE"],"cpe":"cpe:2.3:a:libvcs_project:libvcs:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"fixed":"0.11.1"}]}}],"versions":["v0.11.0","v0.10.1","v0.10.0","v0.9.0","v0.5.0","v0.4.4","v0.4.3","v0.4.2","v0.4.0","v0.4.0rc1","v0.3.3","v0.3.2","v0.3.1post1","v0.3.1","v0.3.0","v0.2.3","v0.2.2","v0.2.1","v0.2.0","v0.1.7","v0.1.6","v0.1.5","v0.1.4","v0.1.3","v0.1.2","v0.1.0","v0.1.1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-21187.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}