{"id":"CVE-2017-9462","published":"2017-06-06T21:00:00Z","modified":"2024-08-05T17:11:01Z","title":"In Mercurial before 4.1.3, \"hg serve --stdio\" allows remote authenticated users to launch the Python debugger, and…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.21685,"percentile":0.9769,"provenance":"source"},"cwes":[],"references":[{"url":"https://access.redhat.com/errata/RHSA-2017:1576","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://www.mercurial-scm.org/repo/hg/rev/77eaf9539499","tags":["x_refsource_CONFIRM"]},{"url":"https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.1.3_.282017-4-18.29","tags":["x_refsource_CONFIRM"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/07/msg00005.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"http://www.debian.org/security/2017/dsa-3963","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://security.gentoo.org/glsa/201709-18","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://bugs.debian.org/861243","tags":["x_refsource_CONFIRM"]},{"url":"http://www.securityfocus.com/bid/99123","tags":["vdb-entry","x_refsource_BID"]}],"priority":{"score":24.5,"factors":[{"name":"EPSS percentile","points":19.54},{"name":"Public exploit code","points":5.0}]},"exploitSources":{"metasploit":[{"name":"Mercurial Custom hg-ssh Wrapper Remote Code Exec","module":"exploit/linux/ssh/mercurial_ssh_exec","type":"exploit","disclosureDate":"2017-04-18","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/ssh/mercurial_ssh_exec.rb"}],"first":{"date":"2017-04-18","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/ssh/mercurial_ssh_exec.rb"},"provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"mercurial","vulnerableRanges":["<4.1.3"],"patched":["4.1.3"],"from":["GHSA-ghjx-3jg5-h6r2","PYSEC-2017-91"],"provenance":"source"}],"summary":{"text":"The flaw lies in Mercurial, in the \"hg serve --stdio\" command: before version 4.1.3, it allows a remote authenticated user to start the Python debugger by supplying \"--debugger\" as a repository name. An attacker who has valid credentials for that server can use this to run arbitrary code, and no further user interaction or special configuration is described beyond the attacker being authenticated and able to reach the service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:42:24Z"},"euvd":{"id":"EUVD-2017-0073","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2016-3069","published":"2016-04-13","fixed":"3.7.3","kev":false},{"cve":"CVE-2016-3630","published":"2016-04-13","fixed":"3.7.3","kev":false},{"cve":"CVE-2016-3105","published":"2016-05-09","fixed":"3.8","kev":false},{"cve":"CVE-2017-9462","published":"2017-06-06","fixed":"4.1.3","kev":false},{"cve":"CVE-2017-1000116","published":"2017-10-04","fixed":"4.3","kev":false,"link":{"from":"CVE-2017-9462","to":"CVE-2017-1000116","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:mercurial","fromFixed":"4.1.3","toFixed":"4.3","daysApart":120}]}},{"cve":"CVE-2017-1000115","published":"2017-10-04","fixed":"4.3.1","kev":false,"link":{"from":"CVE-2017-9462","to":"CVE-2017-1000115","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:mercurial","fromFixed":"4.1.3","toFixed":"4.3","daysApart":120}]}},{"cve":"CVE-2017-17458","published":"2017-12-07","fixed":"4.4.1","kev":false}],"package":"PyPI:mercurial"}}