Skip to content
OpenAdvisories
High · 8.8 Public exploit CVE-2017-9462 EUVD-2017-0073GHSA-ghjx-3jg5-h6r2PYSEC-2017-91

Mercurial has Incorrect Permission Assignment for Critical Resource

Published Jun 6, 2017 · Updated Aug 5, 2024 · Assigned by mitre

Description

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.

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.3.1-1 —
Debian 13 mercurial 4.3.1-1 —
Debian 12 mercurial 4.3.1-1 —
Debian 8 mercurial 3.1.2-2+deb8u5 DLA-1414-1
Debian 7 mercurial 2.2.2-4+deb7u4 DLA-1005-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
RHEL 7 mercurial +3 2.6.2-7.el7_3 RHSA-2017:1576
RHEL 6 mercurial +3 1.4-5.el6_9 RHSA-2017:1576
ReleasePackageFixed inAdvisory
SLES 12 SP2 mercurial 2.8.2-14.1 SUSE-SU-2017:1606-1
SLES 11 SP4 mercurial 2.3.2-0.17.1 SUSE-SU-2017:1558-1

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 7 mercurial +3 2.6.2-7.el7_3 ELSA-2017-1576

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI mercurial < 4.1.3 4.1.3 GHSA-ghjx-3jg5-h6r2

Advisories 6

References