---
id: "CVE-2026-112008"
kind: "vulnerability"
aliases: ["CVE-2026-112008"]
title: "libmng: crafted MNG file overflows heap and crashes the reader"
severity: "medium"
cvss: 6.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["c", "image-processing", "libmng", "package"]
not_affected_if: ["no-mng-decoding"]
published_at: "2026-10-18T12:17:13+00:00"
first_seen_at: "2026-10-23T21:57:15+00:00"
updated_at: "2026-10-25T03:41:02+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112008", "first_seen_at": "2026-10-23T21:57:15+00:00"}]
---

# libmng: crafted MNG file overflows heap and crashes the reader

libmng, the library that decodes MNG animation files, sizes its ORDR entry buffer from 5-byte on-wire records but stores 8-byte entries in memory. A crafted MNG file makes it write attacker-controlled data past the allocation, which crashes the application and may allow more.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check whether an application links libmng by looking for `libmng` in its dependency list or `ldd` output.
- Run `mng-config --version` or check the installed package version against `2.0.3`.

## Timeline

- 2026-10-23T21:57:15+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-112008

## From the sources

libmng through 2.0.3 contains a heap-based buffer overflow vulnerability in mng_read_ordr() that allows attackers to corrupt heap memory because ORDR entry buffers are sized by 5-byte on-wire records instead of 8-byte in-memory entries. Attackers can supply a crafted MNG file with MHDR, DHDR and a multi-record ORDR chunk to applications calling mng_read or mng_readdisplay, writing attacker-controlled data past the allocation and crashing the application.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
