CVE-2026-16118 Xdgmime: heap-based buffer overflow in _xdg_mime_magic_parse_magic_line() in xdgmimemagic.c
Heap-based buffer overflow in xdgmime allows attackers to cause crashes or execute code via malicious MIME magic files.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-16118?
CVE-2026-16118 is a high-severity memory corruption vulnerability in Cert Manager support for Red Hat OpenShift release 1.17, published on 17 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-122
Which versions are affected by CVE-2026-16118?
Linux distribution packages (40)
glib2 AlmaLinux:10 | All versions | 2.80.4-12.el10_2.22 |
glib2-devel AlmaLinux:10 | All versions | 2.80.4-12.el10_2.22 |
glib2-doc AlmaLinux:10 | All versions | 2.80.4-12.el10_2.22 |
glib2-static AlmaLinux:10 | All versions | 2.80.4-12.el10_2.22 |
glib2-tests AlmaLinux:10 | All versions | 2.80.4-12.el10_2.22 |
glib2 AlmaLinux:8 | All versions | 2.56.4-178.el8_10 |
glib2-devel AlmaLinux:8 | All versions | 2.56.4-178.el8_10 |
glib2-doc AlmaLinux:8 | All versions | 2.56.4-178.el8_10 |
glib2-fam AlmaLinux:8 | All versions | 2.56.4-178.el8_10 |
glib2-static AlmaLinux:8 | All versions | 2.56.4-178.el8_10 |
glib2-tests AlmaLinux:8 | All versions | 2.56.4-178.el8_10 |
glib2 AlmaLinux:9 | All versions | 2.68.4-19.el9_8.10 |
glib2-devel AlmaLinux:9 | All versions | 2.68.4-19.el9_8.10 |
glib2-doc AlmaLinux:9 | All versions | 2.68.4-19.el9_8.10 |
glib2-static AlmaLinux:9 | All versions | 2.68.4-19.el9_8.10 |
glib2-tests AlmaLinux:9 | All versions | 2.68.4-19.el9_8.10 |
glib2 Red Hat:enterprise_linux:10.2 | All versions | 0:2.80.4-12.el10_2.22 |
glib2-debuginfo Red Hat:enterprise_linux:10.2 | All versions | 0:2.80.4-12.el10_2.22 |
glib2-debugsource Red Hat:enterprise_linux:10.2 | All versions | 0:2.80.4-12.el10_2.22 |
glib2-devel Red Hat:enterprise_linux:10.2 | All versions | 0:2.80.4-12.el10_2.22 |
glib2-devel-debuginfo Red Hat:enterprise_linux:10.2 | All versions | 0:2.80.4-12.el10_2.22 |
glib2-doc Red Hat:enterprise_linux:10.2 | All versions | 0:2.80.4-12.el10_2.22 |
glib2-static Red Hat:enterprise_linux:10.2 | All versions | 0:2.80.4-12.el10_2.22 |
glib2-tests Red Hat:enterprise_linux:10.2 | All versions | 0:2.80.4-12.el10_2.22 |
glib2-tests-debuginfo Red Hat:enterprise_linux:10.2 | All versions | 0:2.80.4-12.el10_2.22 |
glib2 Red Hat:enterprise_linux:8::baseos | All versions | 0:2.56.4-178.el8_10 |
glib2-debuginfo Red Hat:enterprise_linux:8::baseos | All versions | 0:2.56.4-178.el8_10 |
glib2-debugsource Red Hat:enterprise_linux:8::baseos | All versions | 0:2.56.4-178.el8_10 |
glib2-devel Red Hat:enterprise_linux:8::baseos | All versions | 0:2.56.4-178.el8_10 |
glib2-devel-debuginfo Red Hat:enterprise_linux:8::baseos | All versions | 0:2.56.4-178.el8_10 |
glib2-fam Red Hat:enterprise_linux:8::baseos | All versions | 0:2.56.4-178.el8_10 |
glib2-fam-debuginfo Red Hat:enterprise_linux:8::baseos | All versions | 0:2.56.4-178.el8_10 |
glib2-tests Red Hat:enterprise_linux:8::baseos | All versions | 0:2.56.4-178.el8_10 |
glib2-tests-debuginfo Red Hat:enterprise_linux:8::baseos | All versions | 0:2.56.4-178.el8_10 |
glib2-debuginfo Red Hat:enterprise_linux:8::crb | All versions | 0:2.56.4-178.el8_10 |
glib2-debugsource Red Hat:enterprise_linux:8::crb | All versions | 0:2.56.4-178.el8_10 |
glib2-devel-debuginfo Red Hat:enterprise_linux:8::crb | All versions | 0:2.56.4-178.el8_10 |
glib2-doc Red Hat:enterprise_linux:8::crb | All versions | 0:2.56.4-178.el8_10 |
glib2-fam-debuginfo Red Hat:enterprise_linux:8::crb | All versions | 0:2.56.4-178.el8_10 |
glib2-static Red Hat:enterprise_linux:8::crb | All versions | 0:2.56.4-178.el8_10 |
How do I fix CVE-2026-16118?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-16118 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-16118 exists.
Sources
Also known as ALSA-2026:64799, ALSA-2026:64800, ALSA-2026:66451, CLSA-2026-1789032075, CLSA-2026-1789206553, CLSA-2026-1789392191 and 25 more.