CVE-2018-13348Mercurial
High 7.5 No auth needed
Follow: this CVE · Mercurial · Mercurial We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.0
- 7.5
- EPSS
- 2.1% probability of exploitation in 30 days · percentile 83
- Auth required
- No
- Published
- Jul 6, 2018
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-20
- Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
What happens
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.
What to do
- Apply the vendor's security update for Mercurial.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | mercurial |
< 4.6.1 |
4.6.1 |
pip install "mercurial>=4.6.1" |
| PyPI | mercurial |
< 4.6.1 |
4.6.1 |
pip install "mercurial>=4.6.1" |
Per OSV / GitHub Advisories (GHSA-3v62-ww8w-758m, PYSEC-2018-90). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| mercurial | mercurial | < 4.6.1 |
Official sources
References
Links published by the sources. Open them with care.
- lists.debian.org
- www.mercurial-scm.org Patch Vendor Advisory
- www.mercurial-scm.org Vendor Advisory