CVE-2017-1000116: Mercurial is vulnerable to shell injection attack
9.8
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.87276%
CWE
Published
5/13/2022
Updated
9/25/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
mercurial | pip | < 4.3 | 4.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper sanitization of hostnames in SSH URLs. The _make_ssh_cmd function is responsible for building the SSH connection command. Prior to version 4.3, this function likely concatenated raw hostname input into the command string without proper shell escaping. Security advisories explicitly mention SSH command injection through malicious hostnames, and standard secure coding practices would require adding shell quoting (e.g., via util.shellquote()) around the hostname parameter - a fix implemented in the patched version 4.3.