patchminder
Weaponized · Metasploit CVE-2017-9462

Remote code executionin the mercurial package.

Published 6 Jun 2017 · Updated 5 Aug 2024 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

Weaponized: a Metasploit exploit is public.

Attack code is public
Severity
High 8.8
CVSSA severity score from 0 to 10. 9 and higher is critical. 3.1
Attack likelihood
High
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 21.7% chance in 30 days · 4 Dec 2026
Fix
Available
Upgrade to 4.1.3 or later
In plain words

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.

What to do now
  • Upgrade mercurial (PyPI) to 4.1.3 or later.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
n/a
Not confirmed
Not confirmed
CVE record
mercurial (PyPI)
before 4.1.3
4.1.3
GitHub advisory

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 18 Apr 2017
    Metasploit module: Mercurial Custom hg-ssh Wrapper Remote Code Exec.
  2. 6 Jun 2017
    CVE ID reserved by mitre.
  3. 6 Jun 2017
    Published in the CVE List.
  4. 5 Aug 2024
    CVE record last updated.
Exploit code

Attack code anyone can find

Exploit maturity: Weaponized (Metasploit).

Metasploit module
1 module
Nuclei scan template
None known
Exploit-DB
None known
GitHub proof of concepts
None known

Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.

Related

Other vulnerabilities in this package

References
Cite this page

Patchminder. CVE-2017-9462: Remote code execution in the mercurial package. https://patchminder.com/cve/cve-2017-9462/ (accessed 5 December 2026).