In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch…
Priority MEDIUM 58CWE-732Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat.
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.
Why it matters now
EPSS 0.21685 97th percentileScored 2026-11-07
Fix Fixed mercurial (PyPI): 4.1.3Red Hat: 1 advisory
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | mercurial (PyPI) | before 4.1.3 | 4.1.3 | Patch available | GHSA-ghjx-3jg5-h6r2 |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- mercurial (PyPI) Vendor— Affected before 4.1.3 Fixed in 4.1.3 Patch available GHSA-ghjx-3jg5-h6r2
CPE configurations NVD · 18
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:mercurial:mercurial:*:*:*:*:*:*:*:* | before 4.1.3 | Vulnerable | Mercurial |
| cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* | 8.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* | 9.0 | Vulnerable | Debian |
| cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:* | 6.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:* | 7.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:* | 6.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:* | 7.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_aus:7.3:*:*:*:*:*:*:* | 7.3 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:* | 7.4 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:* | 7.6 | Vulnerable | Red Hat |
- cpe:2.3:a:mercurial:mercurial:*:*:*:*:*:*:*:* Versions before 4.1.3 Vulnerable ·Mercurial
- cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* Versions 8.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Debian
- cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:* Versions 6.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:* Versions 7.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:* Versions 6.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:* Versions 7.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_aus:7.3:*:*:*:*:*:*:* Versions 7.3 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:* Versions 7.4 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:* Versions 7.6 Vulnerable ·Red Hat
Show 8 more CPE
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:redhat:enterprise_linux_server_eus:7.3:*:*:*:*:*:*:* | 7.3 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_eus:7.4:*:*:*:*:*:*:* | 7.4 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:* | 7.5 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:* | 7.6 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_tus:7.3:*:*:*:*:*:*:* | 7.3 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:* | 7.6 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:* | 6.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:* | 7.0 | Vulnerable | Red Hat |
- cpe:2.3:o:redhat:enterprise_linux_server_eus:7.3:*:*:*:*:*:*:* Versions 7.3 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_eus:7.4:*:*:*:*:*:*:* Versions 7.4 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:* Versions 7.5 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:* Versions 7.6 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_tus:7.3:*:*:*:*:*:*:* Versions 7.3 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:* Versions 7.6 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:* Versions 6.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:* Versions 7.0 Vulnerable ·Red Hat
Remediation
- Fix · GHSA-ghjx-3jg5-h6r2 mercurial (PyPI) Fixed in 4.1.3 Advisory →
Red Hat 1 advisory
- RHSA-2017:1576 Released 2017-06-27 · Red Hat rating Importantmercurial security update
- Red Hat Enterprise Linux Client Optional (v. 7) emacs-mercurial-2.6.2-7.el7_3, emacs-mercurial-el-2.6.2-7.el7_3, mercurial-2.6.2-7.el7_3 +1
- Red Hat Enterprise Linux ComputeNode Optional (v. 7) emacs-mercurial-2.6.2-7.el7_3, emacs-mercurial-el-2.6.2-7.el7_3, mercurial-2.6.2-7.el7_3 +1
- Red Hat Enterprise Linux Desktop Optional (v. 6) emacs-mercurial-1.4-5.el6_9, emacs-mercurial-el-1.4-5.el6_9, mercurial-1.4-5.el6_9 +1
- Red Hat Enterprise Linux HPC Node Optional (v. 6) emacs-mercurial-1.4-5.el6_9, emacs-mercurial-el-1.4-5.el6_9, mercurial-1.4-5.el6_9 +1
- Red Hat Enterprise Linux Server (v. 6) mercurial-1.4-5.el6_9
- Red Hat Enterprise Linux Server (v. 7) mercurial-2.6.2-7.el7_3
- Red Hat Enterprise Linux Server Optional (v. 6) emacs-mercurial-1.4-5.el6_9, emacs-mercurial-el-1.4-5.el6_9, mercurial-hgk-1.4-5.el6_9
- Red Hat Enterprise Linux Server Optional (v. 7) emacs-mercurial-2.6.2-7.el7_3, emacs-mercurial-el-2.6.2-7.el7_3, mercurial-hgk-2.6.2-7.el7_3
- Red Hat Enterprise Linux Workstation (v. 6) mercurial-1.4-5.el6_9
- Red Hat Enterprise Linux Workstation (v. 7) mercurial-2.6.2-7.el7_3
- Red Hat Enterprise Linux Workstation Optional (v. 6) emacs-mercurial-1.4-5.el6_9, emacs-mercurial-el-1.4-5.el6_9, mercurial-hgk-1.4-5.el6_9
- Red Hat Enterprise Linux Workstation Optional (v. 7) emacs-mercurial-2.6.2-7.el7_3, emacs-mercurial-el-2.6.2-7.el7_3, mercurial-hgk-2.6.2-7.el7_3
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux Client Optional (v. 7) | Fixed | RHSA-2017:1576 |
| Red Hat Enterprise Linux ComputeNode Optional (v. 7) | Fixed | RHSA-2017:1576 |
| Red Hat Enterprise Linux Desktop Optional (v. 6) | Fixed | RHSA-2017:1576 |
| Red Hat Enterprise Linux HPC Node Optional (v. 6) | Fixed | RHSA-2017:1576 |
| Red Hat Enterprise Linux Server (v. 6) | Fixed | RHSA-2017:1576 |
| Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2017:1576 |
| Red Hat Enterprise Linux Server Optional (v. 6) | Fixed | RHSA-2017:1576 |
| Red Hat Enterprise Linux Server Optional (v. 7) | Fixed | RHSA-2017:1576 |
| Red Hat Enterprise Linux Workstation (v. 6) | Fixed | RHSA-2017:1576 |
| Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2017:1576 |
| Red Hat Enterprise Linux Workstation Optional (v. 6) | Fixed | RHSA-2017:1576 |
| Red Hat Enterprise Linux Workstation Optional (v. 7) | Fixed | RHSA-2017:1576 |
Timeline
- 2026-10-02 Threatist record created from CVE-2017-9462
- 2026-10-03 Alias added: GHSA-ghjx-3jg5-h6r2
References
Advisory 8
- RHSA-2017:1576
- https://www.mercurial-scm.org/repo/hg/rev/77eaf9539499
- https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.1.3_.282017-4-18.29
- [debian-lts-announce] 20180705 [SECURITY] [DLA 1414-1] mercurial security update
- DSA-3963
- GLSA-201709-18
- https://nvd.nist.gov/vuln/detail/CVE-2017-9462
- https://github.com/advisories/GHSA-ghjx-3jg5-h6r2
Sources
- CVE-2017-9462 · CVE Program
- CVE-2017-9462 · NVD
- FIRST EPSS
- GHSA-ghjx-3jg5-h6r2 · GitHub Advisory Database · CC BY 4.0
- CVE-2017-9462 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences