CVE-2017-9462: In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and consequently execute…
Noroxi assessment
Priority: Plan (action score 42/100)
- A ready-made attack module is public (Metasploit); exploiting it takes no special expertise.
- Probability of exploitation in the next 30 days: 21.6% (FIRST EPSS); higher than 97.6% of all records.
- Anyone who can reach it over the internet can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: mercurial (Debian:12) 4.3.1-1; mercurial (Debian:7) 2.2.2-4+deb7u4; mercurial (Debian:8) 3.1.2-2+deb8u5.
Add it to your regular patch cycle. Upgrade to mercurial (Debian:12) 4.3.1-1; mercurial (Debian:7) 2.2.2-4+deb7u4; mercurial (Debian:8) 3.1.2-2+deb8u5 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Jun 6, 2017
- Updated
- Jun 16, 2026
- EPSS
- 21.6% · 97th percentile
- CWE
- CWE-732
Report tools
Action score
42
Add it to your regular patch cycle.
- CVSS
- 35 / 40 · 8.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 7 / 30 · 21.6%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- Weaponized exploit exists
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| mercurial | mercurial | cpe:2.3:a:mercurial:mercurial |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| redhat | enterprise linux desktop | cpe:2.3:o:redhat:enterprise_linux_desktop |
| redhat | enterprise linux server | cpe:2.3:o:redhat:enterprise_linux_server |
| redhat | enterprise linux server aus | cpe:2.3:o:redhat:enterprise_linux_server_aus |
| redhat | enterprise linux server eus | cpe:2.3:o:redhat:enterprise_linux_server_eus |
| redhat | enterprise linux server tus | cpe:2.3:o:redhat:enterprise_linux_server_tus |
| redhat | enterprise linux workstation | cpe:2.3:o:redhat:enterprise_linux_workstation |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux8.0
- debian debian linux9.0
- mercurial mercurialbefore 4.1.3
- redhat enterprise linux desktop6.0
- redhat enterprise linux desktop7.0
- redhat enterprise linux server6.0
- redhat enterprise linux server7.0
- redhat enterprise linux server aus7.3
+10 more rows
- redhat enterprise linux server aus7.4
- redhat enterprise linux server aus7.6
- redhat enterprise linux server eus7.3
- redhat enterprise linux server eus7.4
- redhat enterprise linux server eus7.5
- redhat enterprise linux server eus7.6
- redhat enterprise linux server tus7.3
- redhat enterprise linux server tus7.6
- redhat enterprise linux workstation6.0
- redhat enterprise linux workstation7.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | mercurial | before 4.3.1-1 | 4.3.1-1 |
| Debian:7 | mercurial | before 2.2.2-4+deb7u4 | 2.2.2-4+deb7u4 |
| Debian:8 | mercurial | before 3.1.2-2+deb8u5 | 3.1.2-2+deb8u5 |
| PyPI | mercurial | before 4.1.3 | 4.1.3 |
| Red Hat:enterprise_linux:6::client | emacs-mercurial | before 0:1.4-5.el6_9 | 0:1.4-5.el6_9 |
| Red Hat:enterprise_linux:6::client | emacs-mercurial-el | before 0:1.4-5.el6_9 | 0:1.4-5.el6_9 |
| Red Hat:enterprise_linux:6::client | mercurial | before 0:1.4-5.el6_9 | 0:1.4-5.el6_9 |
| Red Hat:enterprise_linux:6::client | mercurial-debuginfo | before 0:1.4-5.el6_9 | 0:1.4-5.el6_9 |
| Red Hat:enterprise_linux:6::client | mercurial-hgk | before 0:1.4-5.el6_9 | 0:1.4-5.el6_9 |
| Red Hat:enterprise_linux:7::client | emacs-mercurial | before 0:2.6.2-7.el7_3 | 0:2.6.2-7.el7_3 |
| Red Hat:enterprise_linux:7::client | emacs-mercurial-el | before 0:2.6.2-7.el7_3 | 0:2.6.2-7.el7_3 |
| Red Hat:enterprise_linux:7::client | mercurial | before 0:2.6.2-7.el7_3 | 0:2.6.2-7.el7_3 |
| Red Hat:enterprise_linux:7::client | mercurial-debuginfo | before 0:2.6.2-7.el7_3 | 0:2.6.2-7.el7_3 |
| Red Hat:enterprise_linux:7::client | mercurial-hgk | before 0:2.6.2-7.el7_3 | 0:2.6.2-7.el7_3 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | mercurial | before 2.3.2-0.17.1 | 2.3.2-0.17.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | mercurial | before 2.8.2-14.1 | 2.8.2-14.1 |
Same product
mercurial: all recordsOther highest-scoring records for the same primary product.
- CVE-2014-9390Git before 1.8.5.6, 1.9.x before 1.9.5, 2.0.x before 2.0.5, 2.1.x before 2.1.4, and 2.2.x before 2.2.1 on Windows and OS X; Mercurial…62This week
- CVE-2017-17458In Mercurial before 4.4.1, it is possible that a specially malformed repository can cause Git subrepositories to run arbitrary code in the…41Plan
- CVE-2017-1000116Mercurial prior to 4.3 did not adequately sanitize hostnames passed to ssh, leading to possible shell-injection attacks.41Plan
Published before and after this one in the same product
- ← EarlierCVE-2016-3630Apr 13, 2016 · The binary delta decoder in Mercurial before 3.7.3 allows remote attackers to execute arbitrary code via a (1) clone, (2) push, or (3) pull…36Monitor
- ← EarlierCVE-2016-3105May 9, 2016 · The convert extension in Mercurial before 3.8 might allow context-dependent attackers to execute arbitrary code via a crafted git…36Monitor
- Later →CVE-2017-1000115Oct 4, 2017 · Mercurial prior to version 4.3 is vulnerable to a missing symlink check that can malicious repositories to modify files outside the…31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:mercurial | 4.3.1-1 · Debian:12 | Package registry (OSV) |
| PyPI:mercurial | 4.1.3 | Package registry (OSV) |
| red hat:emacs-mercurial | 0:1.4-5.el6_9 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
| red hat:emacs-mercurial-el | 0:1.4-5.el6_9 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
| red hat:mercurial | 0:1.4-5.el6_9 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
| red hat:mercurial-debuginfo | 0:1.4-5.el6_9 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
| red hat:mercurial-hgk | 0:1.4-5.el6_9 · Red Hat:enterprise_linux:6::client | Package registry (OSV) |
| suse:mercurial | 2.3.2-0.17.1 · SUSE:Linux Enterprise Software Development Kit 11 SP4 | Package registry (OSV) |
Exploit status
Weaponized
A ready exploit tool or active in-the-wild use is known for this vulnerability. This should be your top priority.
Evidence
- Metasploit module ×1
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Metasploit module | exploit/linux/ssh/mercurial_ssh_execMercurial Custom hg-ssh Wrapper Remote Code Execexploit | 2017-04-18 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- Metasploit-50 d
- Published
- TodayNov 14, 2026+3448 d
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Not on record for this CVE: EPSS history · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-732 · Incorrect Permission Assignment for Critical ResourceCVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Accessing Functionality Not Properly Constrained by ACLsCAPEC-1likelihood: High · High
- Privilege AbuseCAPEC-122likelihood: High · Medium
- Directory IndexingCAPEC-127likelihood: High · Medium
- Using Malicious FilesCAPEC-17likelihood: High · Very High
- Exploiting Incorrectly Configured Access Control Security LevelsCAPEC-180likelihood: High · Medium
- Signing Malicious CodeCAPEC-206Very High
- Hijacking a privileged processCAPEC-234Medium
- Reusing Session IDs (aka Session Replay)CAPEC-60likelihood: High · High
ATT&CK techniques
- File and Directory DiscoveryT1083
- Access Token Manipulation:Token Impersonation/TheftT1134.001
- Server Software Component: Terminal Services DLLT1505.005
- Abuse Elevation Control MechanismT1548
- Use Alternate Authentication Material:Web Session CookieT1550.004
- Subvert Trust Controls:Code SigningT1553.002
- Compromise Client Software BinaryT1554
- Hijack Execution Flow:Executable Installer File Permissions WeaknessT1574.005
- Hijack Execution Flow: ServicesFile Permissions WeaknessT1574.010
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (7 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.