CVE-2017-1000116: OS Command Injection

Published Aug 9, 2017
·
Updated

Mercurial clients sometimes connect to URLs provided by the repository, as subrepositories, via the .hgsub file.

A maliciously constructed ssh:// URL would cause Mercurial clients to run an arbitrary shell command. Such a URL could be generated by a malicious server, by a malicious user committing to a honest server (to attack another user of that server's repositories), or by a proxy server.

The vulnerability affects all clients, including those that use file://, http://, and ssh://.

Other sources

Mercurial prior to 4.3 did not adequately sanitize hostnames passed to ssh, leading to possible shell-injection attacks.

MITRE

Affected Software

16 affected componentsFixes available
redhat/mercurial<4.3
4.3
redhat/mercurial<4.2.3
4.2.3
pip/mercurial<4.3
4.3
Mercurial Mercurial<4.3
Debian Debian Linux=8.0
Debian Debian Linux=9.0
redhat Enterprise Linux Desktop=7.0
redhat Enterprise Linux Server=7.0
redhat Enterprise Linux Server Aus=7.4
redhat Enterprise Linux Server Aus=7.6
redhat Enterprise Linux Server Eus=7.4
redhat Enterprise Linux Server Eus=7.5
redhat Enterprise Linux Server Eus=7.6
redhat Enterprise Linux Server Tus=7.4
redhat Enterprise Linux Server Tus=7.6
redhat Enterprise Linux Workstation=7.0

Event History

Oct 4, 2017
CVE Published
via MITRE·01:00 AM
Data Sourced
via MITRE·01:00 AM
Description
May 13, 2022
Advisory Published
via GitHub·01:40 AM

Frequently Asked Questions

1

What is the severity of CVE-2017-1000116?

CVE-2017-1000116 has a medium severity rating due to the potential for shell-injection attacks.

2

How do I fix CVE-2017-1000116?

To resolve CVE-2017-1000116, upgrade Mercurial to version 4.3 or later.

3

Which versions of Mercurial are affected by CVE-2017-1000116?

CVE-2017-1000116 affects Mercurial versions prior to 4.3.

4

Can CVE-2017-1000116 be exploited through subrepositories?

Yes, CVE-2017-1000116 can be exploited through malicious ssh URL inputs in the .hgsub file.

5

Is there a workaround for CVE-2017-1000116?

A workaround for CVE-2017-1000116 includes avoiding the use of untrusted .hgsub files until an upgrade can be performed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203