Debian DLA-1414-1 : mercurial security update

Critical Nessus Plugin ID 110927

Synopsis

The remote Debian host is missing a security update.

Description

Some security vulnerabilities were found in Mercurial which allow authenticated users to trigger arbitrary code execution and unauthorized data access in certain server configuration. Malformed patches and repositories can also lead to crashes and arbitrary code execution on clients.

CVE-2017-9462

In Mercurial before 4.1.3, 'hg serve --stdio' allows remote authenticated users to launch the Python debugger, and consequently execute arbitrary code, by using --debugger as a repository name.

CVE-2017-17458

In Mercurial before 4.4.1, it is possible that a specially malformed repository can cause Git subrepositories to run arbitrary code in the form of a .git/hooks/post-update script checked into the repository.
Typical use of Mercurial prevents construction of such repositories, but they can be created programmatically.

CVE-2018-1000132

Mercurial version 4.5 and earlier contains a Incorrect Access Control (CWE-285) vulnerability in Protocol server that can result in Unauthorized data access. This attack appear to be exploitable via network connectivity. This vulnerability appears to have been fixed in 4.5.1.

OVE-20180430-0001

mpatch: be more careful about parsing binary patch data

OVE-20180430-0002

mpatch: protect against underflow in mpatch_apply

OVE-20180430-0004

mpatch: ensure fragment start isn't past the end of orig

For Debian 8 'Jessie', these problems have been fixed in version 3.1.2-2+deb8u5.

We recommend that you upgrade your mercurial packages.

NOTE: Tenable Network Security has extracted the preceding description block directly from the DLA security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.

Solution

Upgrade the affected mercurial, and mercurial-common packages.

See Also

https://lists.debian.org/debian-lts-announce/2018/07/msg00005.html

https://packages.debian.org/source/jessie/mercurial

Plugin Details

Severity: Critical

ID: 110927

File Name: debian_DLA-1414.nasl

Version: 1.2

Type: local

Agent: unix

Published: 2018/07/06

Modified: 2018/07/13

Dependencies: 12634

Risk Information

Risk Factor: Critical

CVSSv2

Base Score: 10

Temporal Score: 7.8

Vector: CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C

Temporal Vector: CVSS2#E:POC/RL:OF/RC:C

CVSSv3

Base Score: 9.8

Temporal Score: 8.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:debian:debian_linux:mercurial, p-cpe:/a:debian:debian_linux:mercurial-common, cpe:/o:debian:debian_linux:8.0

Required KB Items: Host/local_checks_enabled, Host/Debian/release, Host/Debian/dpkg-l

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 2018/07/05

Exploitable With

Metasploit (Mercurial Custom hg-ssh Wrapper Remote Code Exec)

Reference Information

CVE: CVE-2017-17458, CVE-2017-9462, CVE-2018-1000132