Vulnerabilities / CVE-2018-13347

critical

CVE-2018-13347

mercurial: Buffer underflow in mpatch.c:mpatch_apply()

Published Modified CWE 190
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 Hat7.5CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

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

Description

mpatch.c in Mercurial before 4.6.1 mishandles integer addition and subtraction, aka OVE-20180430-0002.

Affected packages and fixed versions

SourcePackageFixed in
Photon OS 1.0mercurial4.5.3-2.ph1
Photon OS 2.0mercurial4.5.3-2.ph2
pip::GitHub Security Advisory pipmercurial4.6.1
debian 11mercurial4.6.1-1
debian 12mercurial4.6.1-1
debian 13mercurial4.6.1-1
debian 14mercurial4.6.1-1
debian 8mercurial3.1.2-2+deb8u5
debian 9mercurial4.0-1+deb9u2
echomercurial4.6.1-1
Oracle Linux 7emacs-mercurial, emacs-mercurial-el, mercurial and 1 more2.6.2-10.el7
Red Hatemacs-mercurial, emacs-mercurial-el, mercurial and 1 moreno fix listed
Show all 24 entries from 18 sources
SourcePackageFixed in
Photon OS 1.0mercurial4.5.3-2.ph1
Photon OS 2.0mercurial4.5.3-2.ph2
pip::GitHub Security Advisory pipmercurial4.6.1
debian 11mercurial4.6.1-1
debian 12mercurial4.6.1-1
debian 13mercurial4.6.1-1
debian 14mercurial4.6.1-1
debian 8mercurial3.1.2-2+deb8u5
debian 9mercurial4.0-1+deb9u2
echomercurial4.6.1-1
Oracle Linux 7emacs-mercurial2.6.2-10.el7
Oracle Linux 7emacs-mercurial-el2.6.2-10.el7
Oracle Linux 7mercurial2.6.2-10.el7
Oracle Linux 7mercurial-hgk2.6.2-10.el7
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
ubuntu 18.04mercurial4.5.3-1ubuntu2.1
ubuntu 18.04-ESMmercurial4.5.3-1ubuntu2.1

References

All 11 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.