CVE-2017-17458
Mercurial vulnerable to arbitrary code injection
Reported by mitre · Published December 7, 2017
mercurial is fixed in 4.4.1 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| mercurial | PyPI | 4.4.1 |
| mercurial | mercurial | 4.4.1 |
| mercurial | Ubuntu:14.04:LTS | 2.8.2-1ubuntu1.4 |
| mercurial | Ubuntu:16.04:LTS | 3.7.3-1ubuntu1.1 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| PyPI | mercurial | 0 |
| n/a | n/a | * |
Timeline
- Dec 7, 2017 CVE Published
- Sep 26, 2019 PoC Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Mar 10, 2026 Security Advisory
- Oct 1, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2017-17458
vulnetix vdb fixes CVE-2017-17458
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2017-17458/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- [debian-lts-announce] 20171228 [SECURITY] [DLA 1224-1] mercurial security update mailing-listx_refsource_MLIST
- x_refsource_MISC
- [debian-lts-announce] 20180727 [SECURITY] [DLA 1414-2] mercurial regression update mailing-listx_refsource_MLIST
- [debian-lts-announce] 20180705 [SECURITY] [DLA 1414-1] mercurial security update mailing-listx_refsource_MLIST
- x_refsource_MISC
- 102926 vdb-entryx_refsource_BID
- x_refsource_MISC
- x_refsource_CONFIRM
- [debian-lts-announce] 20200731 [SECURITY] [DLA 2293-1] mercurial security update mailing-listx_refsource_MLIST
- https://nvd.nist.gov/vuln/detail/CVE-2017-17458 advisory
- https://github.com/advisories/GHSA-6v56-cpg6-3rpx advisory
- https://github.com/dscho/hg url
- https://github.com/pypa/advisory-database/tree/main/vulns/mercurial/PYSEC-2017-90.yaml advisory
- https://web.archive.org/web/20200227132808/http://www.securityfocus.com/bid/102926 url