CVE-2017-17458Mercurial
Critical 9.8 No auth needed
Follow: this CVE · Mercurial · Mercurial We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.0
- 9.8
- EPSS
- 6.3% probability of exploitation in 30 days · percentile 94
- Auth required
- No
- Published
- Dec 7, 2017
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-78
- Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Mercurial.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | mercurial |
< 4.4.1 |
4.4.1 |
pip install "mercurial>=4.4.1" |
| PyPI | mercurial |
< 4.4.1 |
4.4.1 |
pip install "mercurial>=4.4.1" |
Per OSV / GitHub Advisories (GHSA-6v56-cpg6-3rpx, PYSEC-2017-90). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| mercurial | mercurial | < 4.4.1 |
| debian | debian_linux | 7.0 |
| debian | debian_linux | 8.0 |
Official sources
References
Links published by the sources. Open them with care.
- www.securityfocus.com Third Party Advisory VDB Entry
- bz.mercurial-scm.org Issue Tracking Third Party Advisory
- confluence.atlassian.com Third Party Advisory
- lists.debian.org Mailing List Third Party Advisory
- lists.debian.org Mailing List Third Party Advisory
- lists.debian.org Mailing List Third Party Advisory
- lists.debian.org
- www.mercurial-scm.org Vendor Advisory
- www.mercurial-scm.org Vendor Advisory