VYPR
Critical severityNVD Advisory· Published Jul 6, 2018· Updated Aug 5, 2024

CVE-2018-13347

CVE-2018-13347

Description

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

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Mercurial before 4.6.1 mishandles integer addition/subtraction in mpatch.c, leading to a denial-of-service or potential memory corruption.

Vulnerability

An integer handling flaw exists in the mpatch.c file of Mercurial versions prior to 4.6.1 [1]. The vulnerability is due to incorrect handling of integer addition and subtraction operations, which can lead to an integer overflow or underflow [3]. This issue affects all Mercurial releases before the 4.6.1 minor release, which was published on 2018-06-06 [1].

Exploitation

An attacker can trigger the vulnerability by providing a specially crafted input that causes the manipulated integer operations in the mpatch binary diff code to exceed their intended bounds [1][3]. The attack likely requires the target to process a malicious patch or repository operation that invokes the mpatch functionality, potentially through a network clone or pull operation [2].

Impact

Successful exploitation can result in a denial-of-service condition due to application crash or, in some scenarios, memory corruption that could be leveraged for further compromise [3]. The outcome depends on the specific integer miscalculation and its effect on buffer operations within the mpatch code.

Mitigation

The vulnerability is fixed in Mercurial version 4.6.1, released on 2018-06-06 [1]. Users should upgrade to this version or later. Red Hat Enterprise Linux users can apply the fix via RHSA-2019:2276 [2]. No workaround is documented in the available references; applying the patch is the recommended action.

AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
mercurialPyPI
< 4.6.14.6.1

Affected products

4

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

8

News mentions

0

No linked articles in our index yet.