Vulnerabilities / CVE-2017-17458

critical

CVE-2017-17458

mercurial: arbitrary command execution in mercurial repo with a git submodule

Published Modified CWE 78
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA9.3CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat6.3CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L

Trivy's own label is CRITICAL. Rated critical by NVD, GHSA. Rated lower by Red Hat (medium), Ubuntu (medium).

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.

Affected packages and fixed versions

SourcePackageFixed in
pip::GitHub Security Advisory pipmercurial4.4.1
debian 11mercurial4.4.1-1
debian 12mercurial4.4.1-1
debian 13mercurial4.4.1-1
debian 14mercurial4.4.1-1
debian 7mercurial2.2.2-4+deb7u6
debian 8mercurial3.1.2-2+deb8u6
debian 9mercurial4.0-1+deb9u2
echomercurial4.4.1-1
Red Hatemacs-mercurial, emacs-mercurial-el, mercurial and 1 moreno fix listed
ubuntu 14.04mercurial2.8.2-1ubuntu1.4
ubuntu 14.04-ESMmercurial2.8.2-1ubuntu1.4
Show all 17 entries from 14 sources
SourcePackageFixed in
pip::GitHub Security Advisory pipmercurial4.4.1
debian 11mercurial4.4.1-1
debian 12mercurial4.4.1-1
debian 13mercurial4.4.1-1
debian 14mercurial4.4.1-1
debian 7mercurial2.2.2-4+deb7u6
debian 8mercurial3.1.2-2+deb8u6
debian 9mercurial4.0-1+deb9u2
echomercurial4.4.1-1
Red Hatemacs-mercurialno fix listed
Red Hatemacs-mercurial-elno fix listed
Red Hatmercurialno fix listed
Red Hatmercurial-hgkno fix listed
ubuntu 14.04mercurial2.8.2-1ubuntu1.4
ubuntu 14.04-ESMmercurial2.8.2-1ubuntu1.4
ubuntu 16.04mercurial3.7.3-1ubuntu1.1
ubuntu 16.04-ESMmercurial3.7.3-1ubuntu1.1

References

All 15 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.