CVE-2017-17458
mercurial: arbitrary command execution in mercurial repo with a git submodule
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD, GHSA. Rated lower by Red Hat (medium), Ubuntu (medium).
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.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| pip::GitHub Security Advisory pip | mercurial | 4.4.1 |
| debian 11 | mercurial | 4.4.1-1 |
| debian 12 | mercurial | 4.4.1-1 |
| debian 13 | mercurial | 4.4.1-1 |
| debian 14 | mercurial | 4.4.1-1 |
| debian 7 | mercurial | 2.2.2-4+deb7u6 |
| debian 8 | mercurial | 3.1.2-2+deb8u6 |
| debian 9 | mercurial | 4.0-1+deb9u2 |
| echo | mercurial | 4.4.1-1 |
| Red Hat | emacs-mercurial, emacs-mercurial-el, mercurial and 1 more | no fix listed |
| ubuntu 14.04 | mercurial | 2.8.2-1ubuntu1.4 |
| ubuntu 14.04-ESM | mercurial | 2.8.2-1ubuntu1.4 |
Show all 17 entries from 14 sources
| Source | Package | Fixed in |
|---|---|---|
| pip::GitHub Security Advisory pip | mercurial | 4.4.1 |
| debian 11 | mercurial | 4.4.1-1 |
| debian 12 | mercurial | 4.4.1-1 |
| debian 13 | mercurial | 4.4.1-1 |
| debian 14 | mercurial | 4.4.1-1 |
| debian 7 | mercurial | 2.2.2-4+deb7u6 |
| debian 8 | mercurial | 3.1.2-2+deb8u6 |
| debian 9 | mercurial | 4.0-1+deb9u2 |
| echo | mercurial | 4.4.1-1 |
| Red Hat | emacs-mercurial | no fix listed |
| Red Hat | emacs-mercurial-el | no fix listed |
| Red Hat | mercurial | no fix listed |
| Red Hat | mercurial-hgk | no fix listed |
| ubuntu 14.04 | mercurial | 2.8.2-1ubuntu1.4 |
| ubuntu 14.04-ESM | mercurial | 2.8.2-1ubuntu1.4 |
| ubuntu 16.04 | mercurial | 3.7.3-1ubuntu1.1 |
| ubuntu 16.04-ESM | mercurial | 3.7.3-1ubuntu1.1 |
References
- http://www.securityfocus.com/bid/102926
- https://access.redhat.com/security/cve/CVE-2017-17458
- https://bz.mercurial-scm.org/show_bug.cgi?id=5730
- https://confluence.atlassian.com/sourcetreekb/sourcetree-security-advisory-2018-01-24-942834324.html
- https://github.com/dscho/hg
- https://github.com/pypa/advisory-database/tree/main/vulns/mercurial/PYSEC-2017-90.yaml
- https://lists.debian.org/debian-lts-announce/2017/12/msg00027.html
- https://lists.debian.org/debian-lts-announce/2018/07/msg00005.html
All 15 references
- https://lists.debian.org/debian-lts-announce/2018/07/msg00041.html
- https://lists.debian.org/debian-lts-announce/2020/07/msg00032.html
- https://nvd.nist.gov/vuln/detail/CVE-2017-17458
- https://web.archive.org/web/20200227132808/http://www.securityfocus.com/bid/102926
- https://www.cve.org/CVERecord?id=CVE-2017-17458
- https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-November/107333.html
- https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.4.1_.282017-11-07.29