CVE-2018-13348
HIGH 7.5CVSS 3.0Mercurial Improper Input Validation vulnerability
The mpatch_decode function in mpatch.c in Mercurial before 4.6.1 mishandles certain situations where there should be at least 12 bytes remaining after the current position in the patch data, but actually are not, aka OVE-20180430-0001.
- Published
- 6 Jul 2018
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-20
- Also known as
- GHSA-3v62-ww8w-758mPYSEC-2018-90
- Sources
- NVDJSONOSV GHSA-3v62-ww8w-758mJSONOSV PYSEC-2018-90JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.0 | HIGH 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.0 | HIGH 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | mercurial | mercurialcpe:2.3:a:mercurial:mercurial:*:*:*:*:*:*:*:* |
< 4.6.1 | 4.6.1 |
| OSV | PyPI | mercurial | < 4.6.1 | 4.6.1 |
References
- https://lists.debian.org/debian-lts-announce/2020/07/msg00032.html · WEB
- https://www.mercurial-scm.org/repo/hg/rev/90a274965de7 · Patch, Vendor Advisory, WEB
- https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.6.1_.282018-06-06.29 · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2018-13348 · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/mercurial/PYSEC-2018-90.yaml · WEB
- https://github.com/advisories/GHSA-3v62-ww8w-758m · ADVISORY
History
- 25 Nov 2026 20:21 UTC · NVD: first stored (published 6 Jul 2018)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 6 Jul 2018)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 13 May 2022)