Every CVE Search/ Get API key

CVE-2018-13347

Mercurial mishandles integer addition and subtraction

9.8 CriticalFix available

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

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.72%Up 1.5 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 9.8

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

Record
CVE-2018-13347
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-190
Updated
2026-11-02
CVE List No score

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

Record
CVE-2018-13347
Updated
2026-11-02
EUVDEUVD-2018-0096 No score

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

Record
EUVD-2018-0096
Updated
2026-11-03
GitHub AdvisoriesGHSA-3mjj-mr4f-qxmx 9.3

Mercurial mishandles integer addition and subtraction

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

Record
GHSA-3mjj-mr4f-qxmx
CVSS 4.0
9.3 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-190
Updated
2026-11-02
OSV 9.8

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

Record
CVE-2018-13347
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2018-13347 9.8

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

Record
DEBIAN-CVE-2018-13347
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 8 moreShow less
OSVGHSA-3mjj-mr4f-qxmx 9.3

Mercurial mishandles integer addition and subtraction

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

Record
GHSA-3mjj-mr4f-qxmx
CVSS 4.0
9.3 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-190
Updated
2026-11-02
OSVRHSA-2019:2276 7.5

Red Hat Security Advisory: mercurial security update

Record
RHSA-2019:2276
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2018-13347 9.8

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

Record
UBUNTU-CVE-2018-13347
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVMGASA-2018-0355 No score

Updated mercurial packages fix security vulnerabilities

This update provides mercurial version 4.6.2 and fixes the following security issues:

Fix the mpatch_apply function in mpatch.c that incorrectly proceeds in cases where the fragment start is past the end of the original data (CVE-2018-13346).

Fix mpatch.c that mishandles integer addition and subtraction (CVE-2018-13347).

Fix the mpatch_decode function in mpatch.c that mishandles certain situations where there should be at least 12 bytes remaining after the current position in the patch data (CVE-2018-13348).

Remote attackers may bypass HTTP server permissions via batch wire protocol commands(CVE-2018-1000132).

Record
MGASA-2018-0355
Updated
2026-11-02
OSVPYSEC-2018-89 No score

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

Record
PYSEC-2018-89
Updated
2026-11-02
OSVSUSE-SU-2018:1990-1 No score

Security update for mercurial

This update for mercurial fixes the following issues:

Security issues fixed:

  • CVE-2018-13346: Fix mpatch_apply function in mpatch.c that incorrectly proceeds in cases where the fragment start is past the end of the original data (bsc#1100354).
  • CVE-2018-13347: Fix mpatch.c that mishandles integer addition and subtraction (bsc#1100355).
  • CVE-2018-13348: Fix the mpatch_decode function in mpatch.c that mishandles certain situations where there should be at least 12 bytes remaining after thecurrent position in the patch data (bsc#1100353).
Record
SUSE-SU-2018:1990-1
Updated
2026-11-02
OSVSUSE-SU-2018:1996-1 No score

Security update for mercurial

This update for mercurial fixes the following issues:

Security issues fixed:

  • CVE-2018-13346: Fix mpatch_apply function in mpatch.c that incorrectly proceeds in cases where the fragment start is past the end of the original data (bsc#1100354).
  • CVE-2018-13347: Fix mpatch.c that mishandles integer addition and subtraction (bsc#1100355).
  • CVE-2018-13348: Fix the mpatch_decode function in mpatch.c that mishandles certain situations where there should be at least 12 bytes remaining after thecurrent position in the patch data (bsc#1100353).
Record
SUSE-SU-2018:1996-1
Updated
2026-11-02
OSVSUSE-SU-2018:1998-1 No score

Security update for mercurial

This update for mercurial fixes the following issues:

Security issues fixed:

  • CVE-2018-13346: Fix mpatch_apply function in mpatch.c that incorrectly proceeds in cases where the fragment start is past the end of the original data (bsc#1100354).
  • CVE-2018-13347: Fix mpatch.c that mishandles integer addition and subtraction (bsc#1100355).
  • CVE-2018-13348: Fix the mpatch_decode function in mpatch.c that mishandles certain situations where there should be at least 12 bytes remaining after thecurrent position in the patch data (bsc#1100353).
Record
SUSE-SU-2018:1998-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
mercurial
PyPI
before 4.6.1
4.6.1
mercurial
Debian:12
before 4.6.1-1
4.6.1-1
mercurial
Debian:13
before 4.6.1-1
4.6.1-1
mercurial
Debian:14
before 4.6.1-1
4.6.1-1
mercurial
Debian:8
From an advisory covering 6 CVEs
before 3.1.2-2+deb8u5, plus listed versions
3.1.2-23.1.2-2+deb8u13.1.2-2+deb8u23.1.2-2+deb8u33.1.2-2+deb8u4
3.1.2-2+deb8u5
mercurial
Debian:9
From an advisory covering 6 CVEs
before 4.0-1+deb9u2, plus listed versions
4.0-14.0-1+deb9u1
4.0-1+deb9u2
mercurial
PyPI
before 4.6.1, plus listed versions
0.8.10.90.9.10.9.20.9.3
Show 45 moreShow less
0.9.40.9.51.01.0.11.0.21.11.1.11.1.21.21.2.11.31.3.11.41.4.11.4.21.4.31.51.5.11.5.21.5.31.5.41.61.6.11.6.21.6.31.6.41.71.7.11.7.21.7.31.7.51.81.8.11.8.21.8.31.8.41.91.9.11.9.21.9.32.02.0.12.0.22.12.1.1
4.6.1
mercurial
Mageia:5
From an advisory covering 4 CVEs
before 4.6.2-1.mga5
4.6.2-1.mga5
mercurial
Mageia:6
From an advisory covering 4 CVEs
before 4.6.2-1.mga6
4.6.2-1.mga6
emacs-mercurial
Red Hat:enterprise_linux:7::client
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
Show 25 moreShow less
Affected packages
PackageAffectedFixed
emacs-mercurial-el
Red Hat:enterprise_linux:7::client
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial
Red Hat:enterprise_linux:7::client
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial-debuginfo
Red Hat:enterprise_linux:7::client
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial-hgk
Red Hat:enterprise_linux:7::client
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
emacs-mercurial
Red Hat:enterprise_linux:7::computenode
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
emacs-mercurial-el
Red Hat:enterprise_linux:7::computenode
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial
Red Hat:enterprise_linux:7::computenode
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial-debuginfo
Red Hat:enterprise_linux:7::computenode
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial-hgk
Red Hat:enterprise_linux:7::computenode
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial
Red Hat:enterprise_linux:7::server
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial-debuginfo
Red Hat:enterprise_linux:7::server
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
emacs-mercurial
Red Hat:enterprise_linux:7::server
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
emacs-mercurial-el
Red Hat:enterprise_linux:7::server
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial-hgk
Red Hat:enterprise_linux:7::server
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial
Red Hat:enterprise_linux:7::workstation
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial-debuginfo
Red Hat:enterprise_linux:7::workstation
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
emacs-mercurial
Red Hat:enterprise_linux:7::workstation
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
emacs-mercurial-el
Red Hat:enterprise_linux:7::workstation
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial-hgk
Red Hat:enterprise_linux:7::workstation
From an advisory covering 3 CVEs
before 0:2.6.2-10.el7
0:2.6.2-10.el7
mercurial
SUSE:Linux Enterprise Software Development Kit 12 SP3
From an advisory covering 3 CVEs
before 2.8.2-15.13.1
2.8.2-15.13.1
mercurial
SUSE:Linux Enterprise Software Development Kit 11 SP4
From an advisory covering 3 CVEs
before 2.3.2-0.18.9.1
2.3.2-0.18.9.1
mercurial
SUSE:Linux Enterprise Module for Development Tools 15
From an advisory covering 3 CVEs
before 4.5.2-3.3.1
4.5.2-3.3.1
mercurial
Ubuntu:14.04:LTS
before 2.8.2-1ubuntu1.4, plus listed versions
2.6.3-12.7.2-12.8.1-22.8.2-1ubuntu12.8.2-1ubuntu1.3
2.8.2-1ubuntu1.4
mercurial
Ubuntu:16.04:LTS
before 3.7.3-1ubuntu1.1, plus listed versions
3.4-1ubuntu23.6.2-1ubuntu23.7.3-1ubuntu1
3.7.3-1ubuntu1.1
mercurial
Ubuntu:18.04:LTS
before 4.5.3-1ubuntu2.1, plus listed versions
4.3.1-24.5-1ubuntu14.5.2-0ubuntu24.5.3-1ubuntu2
4.5.3-1ubuntu2.1

History

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2018-13347 is a critical vulnerability (CVSS 9.8) in Mercurial, published July 5, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.72%, the 86th percentile. Fixed in mercurial 4.6.1.

References

Show 31 moreShow less
This page doesn't list everything

Left out here: 97 versions. The JSON record has them.

MoveEnter Open