{"id":"CVE-2017-17458","aliases":["GHSA-6v56-cpg6-3rpx","PYSEC-2017-90"],"kind":"cve","tier":"cold","status":"published","title":"Mercurial vulnerable to arbitrary code injection","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.","ai_summary":null,"severity":"critical","cvss":{"score":9.8,"version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"NVD"},"scores":[{"score":9.8,"version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"nvd"},{"score":10,"version":"2.0","vector":"AV:N/AC:L/Au:N/C:C/I:C/A:C","source":"nvd"}],"cwe":["CWE-78"],"remote":true,"remote_unauth":true,"epss":{"score":0.06386,"percentile":0.93817,"date":"2026-12-02"},"kev":{"listed":false,"added":null,"due":null,"ransomware":null},"exploit":{"public":false,"exploitdb_ids":[]},"affected":[{"ecosystem":"PyPI","name":"mercurial","affected":"< 4.4.1","fixed":["4.4.1"],"source":"osv"}],"affected_products":[{"vendor":"n/a","product":"n/a","versions":"","source":"nvd"}],"ai_versions":null,"mitigation":"Upgrade mercurial to 4.4.1 or later.","technologies":[],"references":[{"url":"https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.4.1_.282017-11-07.29","kind":"vendor"},{"url":"https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-November/107333.html","kind":"vendor"},{"url":"https://confluence.atlassian.com/sourcetreekb/sourcetree-security-advisory-2018-01-24-942834324.html","kind":"vendor"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2017-17458","kind":"vendor"},{"url":"https://github.com/advisories/GHSA-6v56-cpg6-3rpx","kind":"vendor"},{"url":"https://lists.debian.org/debian-lts-announce/2017/12/msg00027.html","kind":"other"},{"url":"https://lists.debian.org/debian-lts-announce/2018/07/msg00041.html","kind":"other"},{"url":"https://lists.debian.org/debian-lts-announce/2018/07/msg00005.html","kind":"other"},{"url":"http://www.securityfocus.com/bid/102926","kind":"other"},{"url":"https://bz.mercurial-scm.org/show_bug.cgi?id=5730","kind":"other"},{"url":"https://lists.debian.org/debian-lts-announce/2020/07/msg00032.html","kind":"other"},{"url":"https://github.com/dscho/hg","kind":"other"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/mercurial/PYSEC-2017-90.yaml","kind":"other"},{"url":"https://web.archive.org/web/20200227132808/http://www.securityfocus.com/bid/102926","kind":"other"}],"workarounds":null,"vendors":["debian","mercurial"],"products":["debian_linux","mercurial"],"cpes":["cpe:2.3:a:mercurial:mercurial:*:*:*:*:*:*:*:*","cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*","cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*"],"published_at":"2017-12-07T18:00:00.000Z","modified_at":"2026-06-17T01:10:49.500Z","promoted_at":null,"attribution":[{"source":"CVE Program","text":"CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation.","url":"https://www.cve.org/Legal/TermsOfUse"},{"source":"NVD","text":"This product uses data from the NVD API but is not endorsed or certified by the NVD.","url":"https://nvd.nist.gov/vuln/detail/CVE-2017-17458"},{"source":"OSV","text":"CC-BY 4.0","url":"https://osv.dev/vulnerability/GHSA-6v56-cpg6-3rpx","license_url":"https://creativecommons.org/licenses/by/4.0/"},{"source":"OSV","text":"CC-BY 4.0","url":"https://osv.dev/vulnerability/PYSEC-2017-90","license_url":"https://creativecommons.org/licenses/by/4.0/"}],"links":{"html":"https://flawdb.com/CVE-2017-17458","markdown":"https://flawdb.com/CVE-2017-17458.md","json":"https://flawdb.com/api/v1/entries/CVE-2017-17458"}}