CVE-2017-17458 Mercurial vulnerable to arbitrary code injection
A specially malformed Mercurial repository can trigger arbitrary code execution via Git hooks, affecting developers using Mercurial with Git subrepositories.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2017-17458?
CVE-2017-17458 is a critical command injection vulnerability in Debian Debian Linux, published on 7 Dec 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In Mercurial before 4.4.1, it is possible that a specially malformed repository can cause Git subrepositories to run arbitrary code in the form of a .git/hooks/post-update script checked into the repository. Typical use of Mercurial prevents construction of such repositories, but they can be created programmatically.
Weakness: CWE-78
Which versions are affected by CVE-2017-17458?
3 open source packages ship an affected version, including mercurial. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
mercurial PyPI | All versions | 4.4.1 |
mercurial PyPI | All versions | 4.4.1 |
mercurial PyPI | All versions | 4.4.1 |
Linux distribution packages (3)
mercurial SUSE:Linux Enterprise Software Development Kit 11 SP4 | All versions | 2.3.2-0.18.6.1 |
mercurial SUSE:Linux Enterprise Software Development Kit 12 SP2 | All versions | 2.8.2-15.6.1 |
mercurial SUSE:Linux Enterprise Software Development Kit 12 SP3 | All versions | 2.8.2-15.6.1 |
Products include Debian Debian Linux, Mercurial Mercurial.
How do I fix CVE-2017-17458?
Upgrade mercurial to 4.4.1 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2017-17458 being exploited?
There is no known exploitation of CVE-2017-17458 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as DEBIAN-CVE-2017-17458, DLA-1224-1, DLA-1414-2, GHSA-6v56-cpg6-3rpx, MGASA-2018-0041, PYSEC-2017-90 and 3 more.