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-9462
This high-severity CVE scores 8.8 under NVD CVSS v3. EPSS exploit probability: 48.7%, top 2% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- High severity, but no confirmed exploitation yet
A fix is available — apply it.
- CVSS v3
- 8.8
- EG Score
- 8.8(medium)
- EPSS
- 97.3%
- KEV
- Not listed
Published
June 6, 2017
Last Modified
May 13, 2026
References (16)
- cve@mitrehttp://www.debian.org/security/2017/dsa-3963
- cve@mitrehttp://www.securityfocus.com/bid/99123
- cve@mitrehttps://access.redhat.com/errata/RHSA-2017:1576
- cve@mitrehttps://bugs.debian.org/861243
- cve@mitrehttps://lists.debian.org/debian-lts-announce/2018/07/msg00005.html
- cve@mitrehttps://security.gentoo.org/glsa/201709-18
- cve@mitrehttps://www.mercurial-scm.org/repo/hg/rev/77eaf9539499
- cve@mitrehttps://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.1.3_.282017-4-18.29
- af854a3a-2127-422b-91ae-364da2661108http://www.debian.org/security/2017/dsa-3963
- af854a3a-2127-422b-91ae-364da2661108http://www.securityfocus.com/bid/99123
- af854a3a-2127-422b-91ae-364da2661108https://access.redhat.com/errata/RHSA-2017:1576
- af854a3a-2127-422b-91ae-364da2661108https://bugs.debian.org/861243
- af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2018/07/msg00005.html
- af854a3a-2127-422b-91ae-364da2661108https://security.gentoo.org/glsa/201709-18
- af854a3a-2127-422b-91ae-364da2661108https://www.mercurial-scm.org/repo/hg/rev/77eaf9539499
Patch Availability(1)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| redhat | mercurial-0:2.6.2-7.el7_3 | 2017-06-27 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(1 across 1 ecosystem)
PyPI(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| mercurial | 0.8.1 ... 4.1.2 (121 versions) | 4.1.3 | — |
All Vendor Advisories
(1)
Every vendor that published an advisory referencing this CVE — pulled from our cve_vendor_advisories aggregation. Click any row for the vendor's original advisory page.
Data Freshness Timeline
(refreshed 9× in last 7d / 37× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-11 22:41 UTCOSV refresh
- 2026-07-11 08:24 UTCEPSS rescore
- 2026-07-09 19:06 UTCEPSS rescore
- 2026-07-08 15:11 UTCEPSS rescore
- 2026-07-07 13:42 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
- 2026-07-06 02:20 UTCEPSS rescore
- 2026-07-06 02:20 UTCEPSS rescore
- 2026-07-05 02:27 UTCEPSS rescore
- 2026-07-04 06:28 UTCEPSS rescore
- 2026-07-04 06:28 UTCEPSS rescore
- 2026-07-02 16:54 UTCEPSS rescore
- 2026-07-01 15:03 UTCEPSS rescore
- 2026-06-29 14:03 UTCEPSS rescore
- 2026-06-28 14:04 UTCEPSS rescore
- 2026-06-28 04:53 UTCEPSS rescore
- 2026-06-28 04:53 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-25 13:47 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-23 05:00 UTCOSV refresh
Show 59 moreShow fewer
- 2026-06-22 14:23 UTCEPSS rescore
- 2026-06-22 14:23 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-18 17:50 UTCEPSS rescore
- 2026-06-17 17:50 UTCEPSS rescore
- 2026-06-16 17:50 UTCEPSS rescore
- 2026-06-15 17:45 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-13 22:57 UTCEPSS rescore
- 2026-06-12 23:09 UTCEPSS rescore
- 2026-06-12 23:09 UTCEPSS rescore
- 2026-06-11 13:57 UTCEPSS rescore
- 2026-06-10 22:15 UTCEPSS rescore
- 2026-06-10 13:19 UTCEPSS rescore
- 2026-06-08 14:14 UTCEPSS rescore
- 2026-06-08 14:14 UTCEPSS rescore
- 2026-06-06 13:45 UTCEPSS rescore
- 2026-06-06 13:45 UTCEPSS rescore
- 2026-06-06 02:47 UTCOSV refresh
- 2026-06-05 22:44 UTCEPSS rescore
- 2026-06-05 22:44 UTCEPSS rescore
- 2026-06-05 06:08 UTCEPSS rescore
- 2026-06-05 06:08 UTCEPSS rescore
- 2026-06-04 13:10 UTCEPSS rescore
- 2026-06-04 13:10 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-05-31 00:14 UTCEPSS rescore
- 2026-05-31 00:14 UTCEPSS rescore
- 2026-05-29 13:41 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-27 13:38 UTCEPSS rescore
- 2026-05-27 13:38 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-23 00:10 UTCEG score recompute
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-22 12:53 UTCEG score recompute
- 2026-05-22 12:53 UTCVendor advisory
- 2026-05-20 22:37 UTCEPSS rescore
- 2026-05-20 22:37 UTCEPSS rescore
- 2026-05-20 22:37 UTCEPSS rescore
- 2026-05-20 22:37 UTCEPSS rescore
- 2026-05-20 22:37 UTCEPSS rescore
- 2026-05-20 22:37 UTCEPSS rescore
- 2026-05-20 22:37 UTCEPSS rescore
- 2026-05-20 22:37 UTCEPSS rescore
- 2026-05-20 22:37 UTCEPSS rescore
- 2026-05-18 21:30 UTCEPSS rescore
- 2026-05-18 21:30 UTCEPSS rescore
- 2026-05-18 21:30 UTCEPSS rescore
Publicly available exploits
(1 reference)Working exploit code is in the public domain (1 Metasploit module). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- Metasploitexploit/linux/ssh/mercurial_ssh_exec✓ verifiedFirst seen Apr 18, 2017
Mercurial Custom hg-ssh Wrapper Remote Code Exec
Open source ↗
Frequently asked(5)
What is CVE-2017-9462?
When was CVE-2017-9462 disclosed?
Is CVE-2017-9462 actively exploited?
What is the CVSS score of CVE-2017-9462?
How do I remediate CVE-2017-9462?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2017-9462
Is Your Infrastructure Affected by CVE-2017-9462?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.