CVE-2017-17458
Mercurial vulnerable to arbitrary code injection
CVE-2017-17458 is a critical vulnerability (CVSS 9.8) in Mercurial, published December 7, 2017. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 6.33%, the 93rd percentile. Fixed in mercurial 4.4.1.
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2017-17458- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 10.0 High
AV:N/AC:L/Au:N/C:C/I:C/A:C - Weakness
- CWE-78
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2017-17458- Updated
- 2026-11-02
EUVDEUVD-2017-0072 No score
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.
- Record
EUVD-2017-0072- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-6v56-cpg6-3rpx
9.3
Mercurial vulnerable to arbitrary code injection
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.
- Record
GHSA-6v56-cpg6-3rpx- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSV
9.8
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.
- Record
CVE-2017-17458- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2017-17458
9.8
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.
- Record
DEBIAN-CVE-2017-17458- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 7 moreShow less
OSVGHSA-6v56-cpg6-3rpx
9.3
Mercurial vulnerable to arbitrary code injection
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.
- Record
GHSA-6v56-cpg6-3rpx- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2017-17458
9.8
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.
- Record
UBUNTU-CVE-2017-17458- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVMGASA-2018-0041 No score
Updated mercurial packages fix security vulnerability
A specially malformed repository may have caused Git subrepositories to run arbitrary code (CVE-2017-17458).
- Record
MGASA-2018-0041- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:10586-1 No score
mercurial-5.9.1-2.1 on GA media
These are all security issues fixed in the mercurial-5.9.1-2.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:10586-1- Updated
- 2026-11-02
OSVPYSEC-2017-90 No score
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.
- Record
PYSEC-2017-90- Updated
- 2026-11-02
OSVSUSE-SU-2018:0127-1 No score
Security update for mercurial
This update for mercurial fixes the following issues:
- CVE-2017-17458: 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. (bsc#1071715):
- Record
SUSE-SU-2018:0127-1- Updated
- 2026-11-02
OSVSUSE-SU-2018:0129-1 No score
Security update for mercurial
This update for mercurial fixes the following issues:
- CVE-2017-17458: 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. (bsc#1071715):
- Record
SUSE-SU-2018:0129-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
mercurialPyPI |
before 4.4.1 | 4.4.1 |
mercurialDebian:12 |
before 4.4.1-1 | 4.4.1-1 |
mercurialDebian:13 |
before 4.4.1-1 | 4.4.1-1 |
mercurialDebian:14 |
before 4.4.1-1 | 4.4.1-1 |
mercurialDebian:7 |
before 2.2.2-4+deb7u6, plus listed versions 2.2.2-32.2.2-42.2.2-4+deb7u12.2.2-4+deb7u22.2.2-4+deb7u32.2.2-4+deb7u42.2.2-4+deb7u5 |
2.2.2-4+deb7u6 |
mercurialDebian:8 |
before 3.1.2-2+deb8u5, plus listed versions 3.1.2-23.1.2-2+deb8u13.1.2-2+deb8u23.1.2-2+deb8u33.1.2-2+deb8u4 |
3.1.2-2+deb8u5 |
mercurialDebian:8 |
before 3.1.2-2+deb8u6, plus listed versions 3.1.2-23.1.2-2+deb8u13.1.2-2+deb8u23.1.2-2+deb8u33.1.2-2+deb8u43.1.2-2+deb8u5 |
3.1.2-2+deb8u6 |
mercurialDebian:9 |
before 4.0-1+deb9u2, plus listed versions 4.0-14.0-1+deb9u1 |
4.0-1+deb9u2 |
mercurialPyPI |
before 4.4.1, plus listed versions 0.8.10.90.9.10.9.20.9.3 Show 45 moreShow less0.9.40.9.51.01.0.11.0.21.11.1.11.1.21.21.2.11.31.3.11.41.4.11.4.21.4.31.51.5.11.5.21.5.31.5.41.61.6.11.6.21.6.31.6.41.71.7.11.7.21.7.31.7.51.81.8.11.8.21.8.31.8.41.91.9.11.9.21.9.32.02.0.12.0.22.12.1.1 |
4.4.1 |
mercurialMageia:5 |
before 3.1.1-5.6.mga5 | 3.1.1-5.6.mga5 |
Show 7 moreShow less
| Package | Affected | Fixed |
|---|---|---|
mercurialMageia:6 |
before 4.1.3-1.2.mga6 | 4.1.3-1.2.mga6 |
mercurialSUSE:Linux Enterprise Software Development Kit 11 SP4 |
before 2.3.2-0.18.6.1 | 2.3.2-0.18.6.1 |
mercurialSUSE:Linux Enterprise Software Development Kit 12 SP2 |
before 2.8.2-15.6.1 | 2.8.2-15.6.1 |
mercurialSUSE:Linux Enterprise Software Development Kit 12 SP3 |
before 2.8.2-15.6.1 | 2.8.2-15.6.1 |
mercurialUbuntu:14.04:LTS |
before 2.8.2-1ubuntu1.4, plus listed versions 2.6.3-12.7.2-12.8.1-22.8.2-1ubuntu12.8.2-1ubuntu1.3 |
2.8.2-1ubuntu1.4 |
mercurialUbuntu:16.04:LTS |
before 3.7.3-1ubuntu1.1, plus listed versions 3.4-1ubuntu23.6.2-1ubuntu23.7.3-1ubuntu1 |
3.7.3-1ubuntu1.1 |
mercurialopenSUSE:Tumbleweed |
before 5.9.1-2.1 | 5.9.1-2.1 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, GitHub Advisories, NVD, OSV |
References
lists.debian.org/debian-lts-announce/2017/12/msg00027.html
mercurial-scm.org/wiki/WhatsNew
lists.debian.org/debian-lts-announce/2018/07/msg00041.html
lists.debian.org/debian-lts-announce/2018/07/msg00005.html
mercurial-scm.org/pipermail/mercurial-devel/2017-November/107333.html
securityfocus.com/bid/102926
Show 26 moreShow less
bz.mercurial-scm.org/show_bug.cgi?id=5730
confluence.atlassian.com/sourcetreekb/sourcetree-security-advisory-2018-01-24-942834324.html
lists.debian.org/debian-lts-announce/2020/07/msg00032.html
nvd.nist.gov/vuln/detail/CVE-2017-17458
web.archive.org/web/20200227132808/http://www.securityfocus.com/bid/102926
github.com/pypa/advisory-database/tree/main/vulns/mercurial/PYSEC-2017-90.yaml
github.com/advisories/GHSA-6v56-cpg6-3rpx
security-tracker.debian.org/tracker/CVE-2017-17458
github.com/dscho/hg
advisories.mageia.org/MGASA-2018-0041.html
bugs.mageia.org/show_bug.cgi?id=22171
lists.opensuse.org/opensuse-updates/2017-12/msg00071.html
suse.com/support/update/announcement/2018/suse-su-20180127-1
bugzilla.suse.com/1071715
suse.com/security/cve/CVE-2017-17458
suse.com/support/update/announcement/2018/suse-su-20180129-1
ubuntu.com/security/CVE-2017-17458
cve.org/CVERecord?id=CVE-2017-17458
suse.com/security/cve/CVE-2008-2942
suse.com/security/cve/CVE-2017-1000115
suse.com/security/cve/CVE-2017-1000116
suse.com/security/cve/CVE-2018-1000132
suse.com/security/cve/CVE-2018-13346
suse.com/security/cve/CVE-2018-13348
suse.com/security/cve/CVE-2018-17983
suse.com/security/cve/CVE-2019-3902
Left out here: 86 versions. The JSON record has them.