CVE-2026-16118

NameCVE-2026-16118
DescriptionA 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs1142717

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
glib2.0 (PTS)bullseye2.66.8-1+deb11u4vulnerable
bullseye (security)2.66.8-1+deb11u8vulnerable
bookworm2.74.6-2+deb12u9vulnerable
bookworm (security)2.74.6-2+deb12u2vulnerable
trixie2.84.4-3~deb13u3vulnerable
forky, sid2.88.3-2vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
glib2.0source(unstable)(unfixed)1142717

Notes

[trixie] - glib2.0 <no-dsa> (Minor issue)
[bookworm] - glib2.0 <postponed> (Minor issue; 2-byte OOB write parsing the mime magic file in an XDG data dir, needs an attacker-writable XDG data dir; unfixed upstream)
[bullseye] - glib2.0 <postponed> (Minor issue; 2-byte OOB write parsing the mime magic file in an XDG data dir, needs an attacker-writable XDG data dir; unfixed upstream)
https://gitlab.gnome.org/GNOME/glib/-/work_items/3992
https://bugzilla.redhat.com/show_bug.cgi?id=2501732
https://gitlab.freedesktop.org/xdg/xdgmime/-/work_items/41

Search for package or bug name: Reporting problems