
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2022-21187 affects the libvcs package versions before 0.11.1. The vulnerability is a Command Injection via argument injection discovered in March 2022. When calling the update_repo function (when using hg), the url parameter is passed to the hg clone command without proper sanitization, allowing attackers to inject hg options and achieve arbitrary command execution (Snyk Advisory).
The vulnerability occurs when the url parameter in the update_repo function is passed directly to the hg clone command without proper validation. An attacker can inject Mercurial (hg) configuration options like aliases to execute arbitrary commands. For example, by providing a URL with the format '--config=alias.clone=!touch ./HELLO', an attacker can execute arbitrary system commands (Snyk Blog, Snyk Advisory).
The vulnerability allows attackers to execute arbitrary commands on the target system, potentially leading to complete system compromise. According to the CVSS v3.1 scoring, this vulnerability has a High severity rating of 8.1, with potential for high impact on confidentiality, integrity, and availability of the affected system (Snyk Advisory).
The vulnerability was fixed in libvcs version 0.11.1. Users should upgrade to this version or higher to mitigate the risk. The fix involves proper sanitization of user-provided URLs before passing them to the hg command (Snyk Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."