CVE-2022-21187 is a high-severity (CVSS 8.1) CWE-88 vulnerability in libvcs. A fix is available for libvcs — see the affected versions and patch details below.
Command Injection
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
libvcs🐍vcspullReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | libvcs | all versions | 0.11.1pip install --upgrade 'libvcs==0.11.1' |
| 🐍PyPI | vcspull | all versions | 1.11.1pip install --upgrade 'vcspull==1.11.1' |
Affected Products
libvcslibvcs_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for libvcs, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update libvcs to 0.11.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-21187 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is CVE-2022-21187 in your dependencies?
Find it across PyPI, including transitive dependencies.