Debian DLA-2293-1 : mercurial security update

Critical Nessus Plugin ID 139244

New! Vulnerability Priority Rating (VPR)

Tenable calculates a dynamic VPR for every vulnerability. VPR combines vulnerability information with threat intelligence and machine learning algorithms to predict which vulnerabilities are most likely to be exploited in attacks. Read more about what VPR is and how it's different from CVSS.

VPR Score: 5.9

Synopsis

The remote Debian host is missing a security update.

Description

Several vulnerabilities were discovered in mercurial, an easy-to-use, scalable distributed version control system.

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-13346

The mpatch_apply function in mpatch.c in Mercurial before 4.6.1 incorrectly proceeds in cases where the fragment start is past the end of the original data.

CVE-2018-13347

mpatch.c in Mercurial before 4.6.1 mishandles integer addition and subtraction.

CVE-2018-13348

The mpatch_decode function in mpatch.c in Mercurial before 4.6.1 mishandles certain situations where there should be at least 12 bytes remaining after the current position in the patch data, but actually are not.

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.

CVE-2019-3902

Symbolic links and subrepositories could be used defeat Mercurial's path-checking logic and write files outside the repository root.

For Debian 9 stretch, these problems have been fixed in version 4.0-1+deb9u2.

We recommend that you upgrade your mercurial packages.

For the detailed security status of mercurial please refer to its security tracker page at:
https://security-tracker.debian.org/tracker/mercurial

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/2020/07/msg00032.html

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

https://security-tracker.debian.org/tracker/source-package/mercurial

Plugin Details

Severity: Critical

ID: 139244

File Name: debian_DLA-2293.nasl

Version: 1.2

Type: local

Agent: unix

Published: 2020/08/03

Updated: 2020/08/06

Dependencies: 12634

Risk Information

Risk Factor: Critical

VPR Score: 5.9

CVSS v2.0

Base Score: 10

Temporal Score: 7.4

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

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

CVSS v3.0

Base Score: 9.8

Temporal Score: 8.5

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:U/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:9.0

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

Exploit Ease: No known exploits are available

Patch Publication Date: 2020/07/31

Vulnerability Publication Date: 2017/12/07

Reference Information

CVE: CVE-2017-17458, CVE-2018-1000132, CVE-2018-13346, CVE-2018-13347, CVE-2018-13348, CVE-2019-3902