OS Command Injection in Mercurial - CVE-2017-1000116

 

OS Command Injection in Mercurial - CVE-2017-1000116

Published: October 5, 2017 / Updated: July 18, 2020


Vulnerability identifier: #VU31408
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2017-1000116
CWE-ID: CWE-78
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote non-authenticated attacker to execute arbitrary code.

Mercurial prior to 4.3 did not adequately sanitize hostnames passed to ssh, leading to possible shell-injection attacks.


Affected software

Mercurial
Arch Linux
Amazon Linux AMI
Gentoo Linux
Red Hat Enterprise Linux for Power, big endian
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux Desktop
Red Hat Enterprise Linux Workstation
Red Hat Enterprise Linux for Scientific Computing
Red Hat Enterprise Linux Server
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux Server for ARM
Red Hat Enterprise Linux EUS Compute Node
Red Hat Enterprise Linux for Power, big endian - Extended Update Support
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux Server - TUS
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux Server - Extended Update Support
Slackware Linux
Fedora
mercurial (Alpine package)
mercurial (Red Hat package)
mercurial

How to mitigate CVE-2017-1000116

Install update from vendor's website.

Mercurial - update to 4.3
mercurial (Alpine package) - update to 4.3.1-r0
mercurial (Red Hat package) - update to 2.6.2-8.el7_4
mercurial - addressed in versions 3.8.1-4.fc25, 4.2.3-1.fc26

External References

Related Security Bulletins