Skip to content
OpenAdvisories
Critical · 9.8 CVE-2017-17458 EUVD-2017-0072GHSA-6v56-cpg6-3rpxPYSEC-2017-90

Mercurial vulnerable to arbitrary code injection

Published Dec 7, 2017 · Updated Aug 5, 2024 · Assigned by mitre

Description

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 mercurial 4.4.1-1 —
Debian 13 mercurial 4.4.1-1 —
Debian 12 mercurial 4.4.1-1 —
Debian 9 mercurial 4.0-1+deb9u2 DLA-2293-1
Debian 8 mercurial 3.1.2-2+deb8u5 DLA-1414-2, DLA-1414-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Debian 7 mercurial 2.2.2-4+deb7u6 DLA-1224-1
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS mercurial 3.7.3-1ubuntu1.1 —
Ubuntu 14.04 LTS mercurial 2.8.2-1ubuntu1.4 —
ReleasePackageFixed inAdvisory
SLES 12 SP3 mercurial 2.8.2-15.6.1 SUSE-SU-2018:0129-1
SLES 12 SP2 mercurial 2.8.2-15.6.1 SUSE-SU-2018:0129-1
SLES 11 SP4 mercurial 2.3.2-0.18.6.1 SUSE-SU-2018:0127-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed mercurial 5.9.1-2.1 openSUSE-SU-2024:10586-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI mercurial < 4.4.1 4.4.1 GHSA-6v56-cpg6-3rpx

Advisories 7

References