CVE-2017-9462 in the critical feed json
Mercurial has Incorrect Permission Assignment for Critical Resource
published 2017-06-06 9 y ago modified 2026-06-17 4 mo ago also GHSA-ghjx-3jg5-h6r2 , PYSEC-2017-91 , EUVD-2017-0073
- cvss
- 8.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 21.7%
- EPSS 21.7% chance of exploitation in 30 days, percentile 97%
- public exploits
- 1
- Metasploit
Summary
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.
Patch / fix
- pypi mercurial 4.1.3
- mercurial mercurial 4.1.3
- mercurial Debian 14, Debian 13, Debian 12 4.3.1-1
debian advisories DEBIAN-CVE-2017-9462
- mercurial Ubuntu 14.04 LTS 2.8.2-1ubuntu1.4
- mercurial Ubuntu 16.04 LTS 3.7.3-1ubuntu1.1
ubuntu advisories UBUNTU-CVE-2017-9462
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- mercurial RHEL 6 1.4-5.el6_9
- mercurial RHEL 7 2.6.2-7.el7_3
- mercurial-hgk RHEL 6 1.4-5.el6_9
- mercurial-hgk RHEL 7 2.6.2-7.el7_3
- emacs-mercurial RHEL 6 1.4-5.el6_9
- emacs-mercurial RHEL 7 2.6.2-7.el7_3
- emacs-mercurial-el RHEL 6 1.4-5.el6_9
- emacs-mercurial-el RHEL 7 2.6.2-7.el7_3
red hat advisories RHSA-2017:1576
- mercurial SLE Software Development Kit 12 SP2 2.8.2-14.1
- mercurial SLE Software Development Kit 11 SP4 2.3.2-0.17.1
suse advisories SUSE-SU-2017:1606-1SUSE-SU-2017:1558-1
- bugs.debian.org/861243 advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2017-9462 updated cvss 6.3
mercurial: Python debugger accessible to authorized users
-
Red Hat Enterprise Linux Client Optional (v. 7) mercurial 2.6.2-7.el7_3, mercurial-hgk 2.6.2-7.el7_3, emacs-mercurial 2.6.2-7.el7_3, emacs-mercurial-el 2.6.2-7.el7_3 Red Hat Enterprise Linux ComputeNode Optional (v. 7) mercurial 2.6.2-7.el7_3, mercurial-hgk 2.6.2-7.el7_3, emacs-mercurial 2.6.2-7.el7_3, emacs-mercurial-el 2.6.2-7.el7_3 Red Hat Enterprise Linux Desktop Optional (v. 6) mercurial 1.4-5.el6_9, mercurial-hgk 1.4-5.el6_9, emacs-mercurial 1.4-5.el6_9, emacs-mercurial-el 1.4-5.el6_9 Red Hat Enterprise Linux HPC Node Optional (v. 6) mercurial 1.4-5.el6_9, mercurial-hgk 1.4-5.el6_9, emacs-mercurial 1.4-5.el6_9, emacs-mercurial-el 1.4-5.el6_9 Red Hat Enterprise Linux Server (v. 6) mercurial 1.4-5.el6_9, mercurial-hgk 1.4-5.el6_9, emacs-mercurial 1.4-5.el6_9, emacs-mercurial-el 1.4-5.el6_9 Red Hat Enterprise Linux Server (v. 7) mercurial 2.6.2-7.el7_3, mercurial-hgk 2.6.2-7.el7_3, emacs-mercurial 2.6.2-7.el7_3, emacs-mercurial-el 2.6.2-7.el7_3fixed: vendor fix RHSA-2017:1576
+6 more productsfewer
Red Hat Enterprise Linux Server Optional (v. 6) mercurial 1.4-5.el6_9, mercurial-hgk 1.4-5.el6_9, emacs-mercurial 1.4-5.el6_9, emacs-mercurial-el 1.4-5.el6_9 Red Hat Enterprise Linux Server Optional (v. 7) mercurial 2.6.2-7.el7_3, mercurial-hgk 2.6.2-7.el7_3, emacs-mercurial 2.6.2-7.el7_3, emacs-mercurial-el 2.6.2-7.el7_3 Red Hat Enterprise Linux Workstation (v. 6) mercurial 1.4-5.el6_9, mercurial-hgk 1.4-5.el6_9, emacs-mercurial 1.4-5.el6_9, emacs-mercurial-el 1.4-5.el6_9 Red Hat Enterprise Linux Workstation (v. 7) mercurial 2.6.2-7.el7_3, mercurial-hgk 2.6.2-7.el7_3, emacs-mercurial 2.6.2-7.el7_3, emacs-mercurial-el 2.6.2-7.el7_3 Red Hat Enterprise Linux Workstation Optional (v. 6) mercurial 1.4-5.el6_9, mercurial-hgk 1.4-5.el6_9, emacs-mercurial 1.4-5.el6_9, emacs-mercurial-el 1.4-5.el6_9 Red Hat Enterprise Linux Workstation Optional (v. 7) mercurial 2.6.2-7.el7_3, mercurial-hgk 2.6.2-7.el7_3, emacs-mercurial 2.6.2-7.el7_3, emacs-mercurial-el 2.6.2-7.el7_3
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Timeline
- First public exploit (Metasploit exploit/linux/ssh/mercurial_ssh_exec)
- Published
Exploit prediction
21.68% chance of exploitation in the next 30 days, higher than 97% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- Metasploit exploit/linux/ssh/mercurial_ssh_exec Mercurial Custom hg-ssh Wrapper Remote Code Exec metasploit exploit, excellent rank, 2017-04-18
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 9.0 | AV:N/AC:L/Au:S/C:C/I:C/A:C |
| GitHub | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | mercurial | <4.1.3 |
4.1.3 |
Classification
- Weakness
-
- CWE-732 Incorrect Permission Assignment for Critical Resource
References
-
bugs.debian.org
/861243
web, issue-tracking, mailing-list, patch, third-party-advisory
-
access.redhat.com
/errata/RHSA-2017:1576
vendor-advisory, web, third-party-advisory, advisory
-
debian.org
/security/2017/dsa-3963
vendor-advisory, web, third-party-advisory, advisory
-
security.gentoo.org
/glsa/201709-18
vendor-advisory, web, third-party-advisory, advisory
-
mercurial-scm.org
/repo/hg/rev/77eaf9539499
web, mailing-list, vendor-advisory
-
mercurial-scm.org
/wiki/WhatsNew#Mercurial_4.1.3_.282017-4-18.29
web, release-notes, vendor-advisory
-
lists.debian.org
/debian-lts-announce/2018/07/msg00005.html
mailing-list, web, third-party-advisory
-
securityfocus.com
/bid/99123
vdb-entry, third-party-advisory, web
-
nvd.nist.gov
/vuln/detail/CVE-2017-9462
advisory
-
github.com
/advisories/GHSA-ghjx-3jg5-h6r2
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/mercurial/PYSEC-2017-91.yaml
web
-
web.archive.org
/web/20200227162318/http://www.securityfocus.com/bid/99123
web
Sources
- CVE List CVE-2017-9462
- GitHub Advisory GHSA-ghjx-3jg5-h6r2
- NVD CVE-2017-9462
- OSV PYSEC-2017-91
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.