CVE-2017-17458
mercurial: arbitrary command execution in mercurial repo with a git submodule
Overview
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.
Source: OX vulnerability database
Severity
9.8 · CRITICAL
CVSS 3.0 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness: CWE-78
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| PyPI | mercurial | <4.4.1 | 4.4.1 |
Open a package to see all its vulnerabilities.
Operating systems · 8 fixes
Red Hat 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | emacs-mercurial +3 | wont fix |
debian 5 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | mercurial | 4.4.1-1 |
| 12 | mercurial | 4.4.1-1 |
| 13 | mercurial | 4.4.1-1 |
| 14 | mercurial | 4.4.1-1 |
| 9 | mercurial | 4.0-1+deb9u2 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| mercurial | 4.4.1-1 |
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | mercurial +2 | 5.9.1-2.1 | openSUSE-SU-2024:10586-1 |
References
- www.securityfocus.com http://www.securityfocus.com/bid/102926
- access.redhat.com https://access.redhat.com/security/cve/CVE-2017-17458
- bz.mercurial-scm.org https://bz.mercurial-scm.org/show_bug.cgi?id=5730
- confluence.atlassian.com https://confluence.atlassian.com/sourcetreekb/sourcetree-security-advisory-2018-01-24-942834324.html
- github.com https://github.com/dscho/hg
- github.com https://github.com/pypa/advisory-database/tree/main/vulns/mercurial/PYSEC-2017-90.yaml
- lists.debian.org https://lists.debian.org/debian-lts-announce/2017/12/msg00027.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2018/07/msg00005.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2018/07/msg00041.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2020/07/msg00032.html
Show all 15 references
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2017-17458
- web.archive.org https://web.archive.org/web/20200227132808/http://www.securityfocus.com/bid/102926
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2017-17458
- www.mercurial-scm.org https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-November/107333.html
- www.mercurial-scm.org https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.4.1_.282017-11-07.29
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.