The mpatch_apply function in mpatch.c in Mercurial before 4.6.1 incorrectly proceeds in…
Priority LOW 37CWE-20Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Partial Red Hat: 6 fixed, 1 without a fix
Attack profile from CVSS 3.0 · NVD. Fix status from CNA, GitHub and Red Hat.
Summary
The mpatch_apply function in mpatch.c in Mercurial before 4.6.1 incorrectly proceeds in cases where the fragment start is past the end of the original data, aka OVE-20180430-0004.
Why it matters now
EPSS 0.02402 84th percentileScored 2026-11-07
Fix Partial mercurial (PyPI): 4.6.1Red Hat: 1 advisoryRed Hat: 6 fixed, 1 without a fix
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | mercurial (PyPI) | before 4.6.1 | 4.6.1 | Patch available | GHSA-9xv4-r2hf-26gh |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- mercurial (PyPI) Vendor— Affected before 4.6.1 Fixed in 4.6.1 Patch available GHSA-9xv4-r2hf-26gh
Remediation
- Fix · GHSA-9xv4-r2hf-26gh mercurial (PyPI) Fixed in 4.6.1 Advisory →
Red Hat 1 advisory
- RHSA-2019:2276 Released 2019-08-06 · Red Hat rating Moderatemercurial security update
- Red Hat Enterprise Linux Client Optional (v. 7) emacs-mercurial-2.6.2-10.el7, emacs-mercurial-el-2.6.2-10.el7, mercurial-2.6.2-10.el7 +1
- Red Hat Enterprise Linux ComputeNode Optional (v. 7) emacs-mercurial-2.6.2-10.el7, emacs-mercurial-el-2.6.2-10.el7, mercurial-2.6.2-10.el7 +1
- Red Hat Enterprise Linux Server (v. 7) mercurial-2.6.2-10.el7
- Red Hat Enterprise Linux Server Optional (v. 7) emacs-mercurial-2.6.2-10.el7, emacs-mercurial-el-2.6.2-10.el7, mercurial-hgk-2.6.2-10.el7
- Red Hat Enterprise Linux Workstation (v. 7) mercurial-2.6.2-10.el7
- Red Hat Enterprise Linux Workstation Optional (v. 7) emacs-mercurial-2.6.2-10.el7, emacs-mercurial-el-2.6.2-10.el7, mercurial-hgk-2.6.2-10.el7
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux Client Optional (v. 7) | Fixed | RHSA-2019:2276 |
| Red Hat Enterprise Linux ComputeNode Optional (v. 7) | Fixed | RHSA-2019:2276 |
| Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2019:2276 |
| Red Hat Enterprise Linux Server Optional (v. 7) | Fixed | RHSA-2019:2276 |
| Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2019:2276 |
| Red Hat Enterprise Linux Workstation Optional (v. 7) | Fixed | RHSA-2019:2276 |
Not affected: 1 product
- Red Hat Enterprise Linux 8
Timeline
- 2026-10-02 Threatist record created from CVE-2018-13346
- 2026-10-03 Alias added: GHSA-9xv4-r2hf-26gh
References
Advisory 3
More Mercurial vulnerabilities
- TI-2014-07619 Git before 1.8.5.6, 1.9.x before 1.9.5, 2.0.x before 2.0.5, 2.1.x before 2.1.4, and 2.2.x… CVSS 3.1CRITICAL 9.8
- TI-2017-06870 In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch… CVSS 3.1HIGH 8.8
- TI-2017-14453 Mercurial prior to 4.3 did not adequately sanitize hostnames passed to ssh, leading to possible shell-injection attacks. CVSS 3.0CRITICAL 9.8
- TI-2017-12752 In Mercurial before 4.4.1, it is possible that a specially malformed repository can cause… CVSS 3.0CRITICAL 9.8
- TI-2018-09592 mpatch.c in Mercurial before 4.6.1 mishandles integer addition and subtraction, aka OVE-20180430-0002. CVSS 3.0CRITICAL 9.8
- TI-2016-03079 The binary delta decoder in Mercurial before 3.7.3 allows remote attackers to execute… CVSS 3.1HIGH 8.8
Sources
- CVE-2018-13346 · CVE Program
- CVE-2018-13346 · NVD
- FIRST EPSS
- GHSA-9xv4-r2hf-26gh · GitHub Advisory Database · CC BY 4.0
- CVE-2018-13346 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences