Description
mpatch.c in Mercurial before 4.6.1 mishandles integer addition and subtraction, aka OVE-20180430-0002.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | mercurial | 4.6.1-1 | — |
| Debian 13 | mercurial | 4.6.1-1 | — |
| Debian 12 | mercurial | 4.6.1-1 | — |
| Debian 9 | mercurial | 4.0-1+deb9u2 | DLA-2293-1 |
| Debian 8 | mercurial | 3.1.2-2+deb8u5 | DLA-1414-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | mercurial | 4.5.3-1ubuntu2.1 | — |
| Ubuntu 16.04 LTS | mercurial | 3.7.3-1ubuntu1.1 | — |
| Ubuntu 14.04 LTS | mercurial | 2.8.2-1ubuntu1.4 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 7 | mercurial +3 | 2.6.2-10.el7 | RHSA-2019:2276 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 | mercurial | 4.5.2-3.3.1 | SUSE-SU-2018:1998-1 |
| SLES 12 SP3 | mercurial | 2.8.2-15.13.1 | SUSE-SU-2018:1990-1 |
| SLES 11 SP4 | mercurial | 2.3.2-0.18.9.1 | SUSE-SU-2018:1996-1 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 7 | mercurial +3 | 2.6.2-10.el7 | ELSA-2019-2276 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | mercurial | < 4.6.1 | 4.6.1 | GHSA-3mjj-mr4f-qxmx |
Advisories 8
- WID-SEC-2022-0517 Red Hat Enterprise Linux: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 18, 2026
- RHSA-2019:2276 Red Hat Security Advisory: mercurial security update Red Hat Security Advisories (RHSA) · Jun 27, 2026
- DLA-2293-1 mercurial - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1414-1 mercurial - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2018:1998-1 Security update for mercurial SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:1996-1 Security update for mercurial SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:1990-1 Security update for mercurial SUSE / openSUSE Security Updates · Feb 4, 2026
- ELSA-2019-2276 Moderate: mercurial security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Aug 13, 2019
References
- https://www.mercurial-scm.org/repo/hg-committed/log?rev=modifies%28%22mercurial%2Fmpatch.c%22%29+and+4.5%3A%3A
- https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.6.1_.282018-06-06.29
- https://www.mercurial-scm.org/repo/hg/rev/1acfc35d478c
- RHSA-2019:2276 vendor-advisory
- [debian-lts-announce] 20200731 [SECURITY] [DLA 2293-1] mercurial security update mailing-list