The package mercurial before version 4.2.3-1 is vulnerable to multiple issues including arbitrary command execution and arbitrary filesystem access.
Arch Linux Security Advisory ASA-201708-7
========================================
Severity: Critical
Date : 2017-08-12
CVE-ID : CVE-2017-1000115 CVE-2017-1000116
Package : mercurial
Type : multiple issues
Remote : Yes
Link : https://security.archlinux.org/AVG-378
Summary
======
The package mercurial before version 4.2.3-1 is vulnerable to multiple
issues including arbitrary command execution and arbitrary filesystem
access.
Resolution
=========
Upgrade to 4.2.3-1.
# pacman -Syu "mercurial>=4.2.3-1"
The problems have been fixed upstream in version 4.2.3.
Workaround
=========
None.
Description
==========
- CVE-2017-1000115 (arbitrary filesystem access)
Mercurial's symlink auditing was incomplete prior to 4.3, and could be
abused to write to files outside the repository.
- CVE-2017-1000116 (arbitrary command execution)
Mercurial < 4.3 was not sanitizing hostnames passed to ssh, allowing
shell injection attacks on clients by specifying a hostname starting
with -oProxyCommand. This is also present in Git (CVE-2017-1000117) and
Subversion (CVE-2017-9800), so please patch those tools as well if you
have them installed.
Impact
=====
A remote attacker can execute arbitrary command on the affected host by
tricking a user into executing a hg command. A remote attacker can use
crafted commits mixing symlinks and regular files to get access to
files outside the repository.
References
=========
https://wiki.mercurial-scm.org/WhatsNew
https://security.archlinux.org/CVE-2017-1000115
https://security.archlinux.org/CVE-2017-1000116