XDGMIME Heap Buffer Overflow via MIME Magic File (CVE-2026-16118)
CVE-2026-16118 Published on July 17, 2026
Xdgmime: heap-based buffer overflow in _xdg_mime_magic_parse_magic_line() in xdgmimemagic.c
A flaw was found in xdgmime. A heap-based buffer overflow can be triggered in _xdg_mime_magic_parse_magic_line() in the xdgmimemagic.c file on little-endian systems when an attacker-controlled MIME magic file in a user-writable XDG data location (e.g., in the $XDG_DATA_HOME/mime/magic path) is parsed by an application performing MIME type detection (e.g., via g_content_type_guess()). When performing byte-swap, incorrect pointer arithmetic on the write side causes an out-of-bounds write of 2 bytes, resulting in an application crash or memory corruption.
Vulnerability Analysis
CVE-2026-16118 is exploitable with local system access, requires user interaction. This vulnerability is considered to have a low attack complexity. Public availability of a proof of concept (POC) exploit exists for CVE-2026-16118. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality, a high impact on integrity and availability.
Timeline
Reported to Red Hat.
Made public.
Weakness Type
Heap-based Buffer Overflow
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
Products Associated with CVE-2026-16118
Want to know whenever a new CVE is published for Red Hat products? stack.watch will email you.
Affected Versions
xdgmime: Red Hat Enterprise Linux 10:- Version 0:2.80.4-12.el10_2.22 and below * is unaffected.
- Version 0:2.80.4-4.el10_0.18 and below * is unaffected.
- Version 0:2.56.4-178.el8_10 and below * is unaffected.
- Version 0:2.68.4-19.el9_8.10 and below * is unaffected.
- Version 0:2.68.4-19.el9_8.10 and below * is unaffected.
- Version 0:2.68.4-7.el9_2.8 and below * is unaffected.
- Version 0:2.68.4-14.el9_4.9 and below * is unaffected.
- Version 0:2.68.4-16.el9_6.8 and below * is unaffected.
- Version 1790223279 and below * is unaffected.
- Version 1790223719 and below * is unaffected.
- Version 1790272426 and below * is unaffected.
- Version 1790589998 and below * is unaffected.
- Version 1790589912 and below * is unaffected.
- Version 1790589914 and below * is unaffected.
- Version 1790589855 and below * is unaffected.
- Version 1790598593 and below * is unaffected.
- Version 1789479916 and below * is unaffected.
- Version 1789479900 and below * is unaffected.
- Version 1789479891 and below * is unaffected.
- Version 1789482961 and below * is unaffected.
- Version 1789478095 and below * is unaffected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.