CVE-2017-17458 json
Mercurial vulnerable to arbitrary code injection
published 2017-12-07 8 y ago modified 2026-06-17 4 mo ago also GHSA-6v56-cpg6-3rpx , PYSEC-2017-90 , EUVD-2017-0072
- cvss
- 9.8
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 6.3%
- EPSS 6.3% chance of exploitation in 30 days, percentile 93%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi mercurial 4.4.1
- mercurial mercurial 4.4.1
- mercurial Debian 14, Debian 13, Debian 12 4.4.1-1
debian advisories DEBIAN-CVE-2017-17458
- mercurial Ubuntu 14.04 LTS 2.8.2-1ubuntu1.4
- mercurial Ubuntu 16.04 LTS 3.7.3-1ubuntu1.1
ubuntu advisories UBUNTU-CVE-2017-17458
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- mercurial SLE Software Development Kit 11 SP4 2.3.2-0.18.6.1
- mercurial SLE Software Development Kit 12 SP3, SLE Software Development Kit 12 SP2 2.8.2-15.6.1
suse advisories SUSE-SU-2018:0127-1SUSE-SU-2018:0129-1
- mercurial openSUSE Tumbleweed 5.9.1-2.1
opensuse advisories openSUSE-SU-2024:10586-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2017-17458 updated cvss 6.3
mercurial: arbitrary command execution in mercurial repo with a git submodule
-
Red Hat Enterprise Linux 6 mercurial, mercurial-hgk, emacs-mercurial, emacs-mercurial-el Red Hat Enterprise Linux 7 mercurial, mercurial-hgk, emacs-mercurial, emacs-mercurial-elaffected: workaround, no fix planned “Disable sub-repositories”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
6.33% chance of exploitation in the next 30 days, higher than 93% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 10.0 | AV:N/AC:L/Au:N/C:C/I:C/A:C |
| GitHub | 3.0 | 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | mercurial | <4.4.1 |
4.4.1 |
Classification
- Weakness
-
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
References
-
mercurial-scm.org
/wiki/WhatsNew#Mercurial_4.4.1_.282017-11-07.29
web, vendor-advisory
-
mercurial-scm.org
/pipermail/mercurial-devel/2017-November/107333.html
web, vendor-advisory
-
lists.debian.org
/debian-lts-announce/2017/12/msg00027.html
mailing-list, web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2018/07/msg00041.html
mailing-list, web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2018/07/msg00005.html
mailing-list, web, third-party-advisory
-
securityfocus.com
/bid/102926
vdb-entry, third-party-advisory, web
-
bz.mercurial-scm.org
/show_bug.cgi?id=5730
web, issue-tracking, third-party-advisory
-
confluence.atlassian.com
/sourcetreekb/sourcetree-security-advisory-2018-01-24-942834324.html
web, third-party-advisory, advisory
-
lists.debian.org
/debian-lts-announce/2020/07/msg00032.html
mailing-list, web
-
nvd.nist.gov
/vuln/detail/CVE-2017-17458
advisory
-
github.com
/dscho/hg
package
-
github.com
/pypa/advisory-database/tree/main/vulns/mercurial/PYSEC-2017-90.yaml
web
-
web.archive.org
/web/20200227132808/http://www.securityfocus.com/bid/102926
web
-
github.com
/advisories/GHSA-6v56-cpg6-3rpx
advisory
Sources
- CVE List CVE-2017-17458
- GitHub Advisory GHSA-6v56-cpg6-3rpx
- NVD CVE-2017-17458
- OSV PYSEC-2017-90
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.