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 1791371080 and below * is unaffected.
- Version 1791371069 and below * is unaffected.
- Version 1791788287 and below * is unaffected.
- Version 1791378395 and below * is unaffected.
- Version 1791970484 and below * is unaffected.
- Version 1791459707 and below * is unaffected.
- Version 1791459711 and below * is unaffected.
- Version 1791459759 and below * is unaffected.
- Version 1789029076 and below * is unaffected.
- Version 1791966259 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 1790621714 and below * is unaffected.
- Version 1790621718 and below * is unaffected.
- Version 1790621713 and below * is unaffected.
- Version 1791425869 and below * is unaffected.
- Version 1791427182 and below * is unaffected.
- Version 1791803821 and below * is unaffected.
- Version 1791473631 and below * is unaffected.
- Version 1791818357 and below * is unaffected.
- Version 1791473614 and below * is unaffected.
- Version 1791460851 and below * is unaffected.
- Version 1790276886 and below * is unaffected.
- Version 1790276884 and below * is unaffected.
- Version 1790277045 and below * is unaffected.
- Version 1790276889 and below * is unaffected.
- Version 1790276974 and below * is unaffected.
- Version 1790703497 and below * is unaffected.
- Version 1790703506 and below * is unaffected.
- Version 1790703590 and below * is unaffected.
- Version 1790703568 and below * is unaffected.
- Version 1790703586 and below * is unaffected.
- Version 1790703494 and below * is unaffected.
- Version 1790703615 and below * is unaffected.
- Version 1790703516 and below * is unaffected.
- Version 1790703524 and below * is unaffected.
- Version 1790703601 and below * is unaffected.
- Version 1790703516 and below * is unaffected.
- Version 1790703608 and below * is unaffected.
- Version 1790703579 and below * is unaffected.
- Version 1790703516 and below * is unaffected.
- Version 1791231820 and below * is unaffected.
- Version 1791232257 and below * is unaffected.
- Version 1790703542 and below * is unaffected.
- Version 1790703539 and below * is unaffected.
- Version 1790703553 and below * is unaffected.
- Version 1790703631 and below * is unaffected.
- Version 1790703597 and below * is unaffected.
- Version 1790703641 and below * is unaffected.
- Version 1790703630 and below * is unaffected.
- Version 1790703541 and below * is unaffected.
- Version 1790703545 and below * is unaffected.
- Version 1790703552 and below * is unaffected.
- Version 1790703656 and below * is unaffected.
- Version 1790703557 and below * is unaffected.
- Version 1790703707 and below * is unaffected.
- Version 1790703645 and below * is unaffected.
- Version 1790703554 and below * is unaffected.
- Version 1790703554 and below * is unaffected.
- Version 1790703630 and below * is unaffected.
- Version 1790703706 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.