In Mercurial versions prior to 4.1.3, the 'hg serve --stdio' command is vulnerable to a flaw where a remote authenticated user can specify '--debugger' as a repository name. This causes the Python debugger to be launched, which allows the attacker to execute arbitrary Python code on the server.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository contains a single Metasploit module (modules/exploits/linux/ssh/mercurial_ssh_exec.rb) that exploits CVE-2017-9462, a vulnerability in custom Mercurial hg-ssh wrappers that fail to properly validate parameters. The exploit connects to a target Linux system via SSH (port 22) using a provided username and private key. It then executes the 'hg -R --debugger serve --stdio' command, triggering a Python debugger session if the wrapper is vulnerable. The module sends a Python-based meterpreter reverse shell payload, granting the attacker remote code execution. The exploit is weaponized, leveraging Metasploit's payload system, and requires the attacker to have SSH credentials and access to a vulnerable custom hg-ssh wrapper. The only endpoints involved are the SSH service (typically port 22) and the SSH private key file used for authentication.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.