CVE-2022-21187
Python vulnerability analysis and mitigation

Overview

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

Technical details

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

Impact

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

Mitigation and workarounds

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

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66423HIGH7.1
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-66454MEDIUM6.5
  • PythonPython
  • arcade-mcp-server
NoYesDec 02, 2025
CVE-2025-66424MEDIUM6.5
  • PythonPython
  • trytond
NoYesNov 30, 2025
CVE-2025-66422MEDIUM4.3
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-65858LOW3.5
  • PythonPython
  • calibreweb
NoNoDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management