{"id":"CVE-2022-21187","aliases":["CVE-2022-21187","GHSA-mv2w-4jqc-6fg4","PYSEC-2022-163","PYSEC-2026-563","SNYK-PYTHON-LIBVCS-2421204"],"related":[],"kind":"vulnerability","state":"published","title":"Command Injection","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"El paquete libvcs versiones anteriores a 0.11.1, es vulnerable a una Inyección de Comandos por medio de una inyección de argumentos. Cuando es llamado a la función update_repo (cuando es usado hg), el parámetro url es pasado al comando hg clone. Inyectando algunas opciones de hg era posible conseguir una ejecución arbitraria de comandos","source":"nvd"}],"published":"2022-03-14T17:15:17.020Z","modified":"2026-07-01T20:23:11.167Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-74","CWE-77","CWE-88"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"0.11.1","status":"affected"}],"product":"libvcs","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.11.1"}],"ecosystem":"PyPI","package":"libvcs","purl":"pkg:pypi/libvcs","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.11.1"}],"ecosystem":"PyPI","package":"vcspull","purl":"pkg:pypi/vcspull","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.11.1"}],"vendor":"libvcs_project","product":"libvcs","cpe":"cpe:2.3:a:libvcs_project:libvcs:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.11.1"}],"ecosystem":"PyPI","package":"libvcs","purl":"pkg:pypi/libvcs","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.11.1"}],"ecosystem":"PyPI","package":"vcspull","purl":"pkg:pypi/vcspull","source":"pysec"}],"references":[{"url":"https://snyk.io/vuln/SNYK-PYTHON-LIBVCS-2421204","tags":["advisory","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/vcs-python/libvcs/blob/v0.11.1/CHANGES%23libvcs-0111-2022-03-12","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/vcs-python/libvcs/pull/306","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21187","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/vcs-python/vcspull/commit/e1b77128a1fa0754625b5f43d8bc47956f21f33e","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/libvcs/PYSEC-2022-163.yaml","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/vcs-python/libvcs/blob/master/CHANGES#libvcs-0111-2022-03-12","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/vcs-python/vcspull/blob/master/CHANGES#vcspull-1111-2022-03-12","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/vcspull","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-mv2w-4jqc-6fg4","tags":["advisory"],"sources":["pysec"]}],"credits":["Alessio Della Libera of Snyk Research Team"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-21187","url":"https://www.cve.org/CVERecord?id=CVE-2022-21187","licence":"CVE Terms of Use","modified":"2024-09-16T18:13:45.548Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mv2w-4jqc-6fg4","url":"https://github.com/advisories/GHSA-mv2w-4jqc-6fg4","licence":"CC-BY-4.0","modified":"2026-06-29T12:26:21.761Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-21187","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21187","licence":"Public domain","modified":"2026-06-17T04:25:42.453Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-163","url":"https://osv.dev/vulnerability/PYSEC-2022-163","licence":"CC-BY-4.0","modified":"2026-06-29T12:26:21.761Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-563","url":"https://osv.dev/vulnerability/PYSEC-2026-563","licence":"CC-BY-4.0","modified":"2026-07-01T20:23:11.167Z"}],"updatedAt":"2026-11-25T22:58:10.092Z","epss":{"score":0.03694,"percentile":0.9001,"date":"2026-12-01T12:00:22.000Z"}}