Skip to main content

xdgmime EUVDEUVD-2026-45266

| CVE-2026-16118 HIGH
Heap-based Buffer Overflow (CWE-122)
2026-07-17 redhat GHSA-cp7g-r78m-cc2g
7.1
CVSS 3.1 · Vendor: redhat
Share

Severity by source

Vendor (redhat) PRIMARY
7.1 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
vuln.today AI
7.1 HIGH

Local attacker-controlled magic file (AV:L) parsed only when an app performs MIME detection (UI:R); OOB write corrupts memory (I:H/A:H) with no data disclosure (C:N).

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat
7.1 MEDIUM
qualitative

Primary rating from Vendor (redhat).

CVSS VectorVendor: redhat

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

Lifecycle Timeline

2
Analysis Generated
Jul 17, 2026 - 20:18 vuln.today
CVE Published
Jul 17, 2026 - 19:44 cve.org
HIGH 7.1

DescriptionCVE.org

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.

AnalysisAI

Out-of-bounds heap write in the freedesktop xdgmime library (bundled with GLib-based MIME detection) allows a local attacker to crash or corrupt the memory of any application that guesses content types via g_content_type_guess(). The flaw lives in _xdg_mime_magic_parse_magic_line() in xdgmimemagic.c and triggers on little-endian systems when a maliciously crafted MIME magic file placed in a user-writable XDG data location is parsed, producing a 2-byte out-of-bounds write. Red Hat rates it 7.1 (Important); no public exploit is identified at time of analysis and it is not listed in CISA KEV.

Technical ContextAI

xdgmime is the reference implementation of the freedesktop.org Shared MIME-info specification and is vendored into GLib/GIO, so it underpins content-type detection across the Linux desktop stack (file managers, GTK applications, thumbnailers, and anything calling g_content_type_guess()). Compiled MIME magic databases (the $XDG_DATA_HOME/mime/magic file) are parsed at runtime to match file signatures. The bug is a textbook CWE-122 heap-based buffer overflow: while byte-swapping magic values on little-endian hardware, _xdg_mime_magic_parse_magic_line() performs incorrect pointer arithmetic on the write side, so the swapped 2-byte value is stored past the end of the allocated buffer. Because XDG data directories under the user's home are writable and take precedence in the MIME lookup order, a user can supply a malicious magic database that any subsequently launched MIME-parsing process will load.

RemediationAI

No vendor-released patched version was identified in the provided data; the upstream fix is tracked as a freedesktop xdgmime work item (https://gitlab.freedesktop.org/xdg/xdgmime/-/work_items/41) and a released patched version is not independently confirmed, so monitor the Red Hat advisory (https://access.redhat.com/security/cve/CVE-2026-16118) and apply the xdgmime/GLib update for your RHEL 7/8/9/10 release as soon as it ships. As compensating controls until a patch lands, restrict who can write to per-user XDG data locations and audit for unexpected $XDG_DATA_HOME/mime/magic files, since planting one is the precondition; on multi-user or service hosts, ensure daemons that perform MIME detection do not read magic databases from untrusted user home directories - for example run such services with a sanitized XDG_DATA_HOME/XDG_DATA_DIRS pointing only to trusted system paths, accepting that this disables user-customized MIME associations. There is no network-facing surface to firewall off; the trade-off of these controls is reduced per-user MIME customization.

CVE-2026-18663 MEDIUM
5.9 Aug 12

Heap corruption via double-free in 389-ds-base's LDAP control parsing allows an unauthenticated remote attacker to crash

CVE-2026-4631 CRITICAL POC
9.8 Apr 07

Remote code execution in Cockpit's web interface allows unauthenticated attackers to execute arbitrary commands on the h

CVE-2026-4480 CRITICAL POC
9.0 May 26

Remote code execution in Samba's printing subsystem allows remote attackers to inject arbitrary shell commands via craft

CVE-2026-18922 CRITICAL
9.8 Sep 07

Authentication bypass in 389 Directory Server (shipped as Red Hat Directory Server 11-13 and within RHEL 6-10) lets remo

CVE-2026-14544 CRITICAL
9.8 Jul 03

Remote code execution and privilege escalation in HPLIP (HP Linux Imaging and Printing) affects the hpcups print filter

CVE-2026-76578 CRITICAL
9.8 Sep 07

Unauthenticated privilege escalation in FreeIPA (Red Hat Identity Management) allows a remote attacker to gain genuine a

CVE-2026-5121 HIGH
7.5 Mar 30

Remote code execution in libarchive on 32-bit systems allows unauthenticated attackers to execute arbitrary code via spe

CVE-2026-28369 CRITICAL
9.1 Mar 27

HTTP request smuggling in Undertow (the embedded web server underpinning JBoss EAP, Red Hat Data Grid, and Apache Camel

CVE-2026-28368 CRITICAL
9.1 Mar 27

HTTP request smuggling in Red Hat Undertow allows remote unauthenticated attackers to bypass front-end security controls

CVE-2026-33845 CRITICAL
9.1 Apr 30

Out-of-bounds read in the GnuTLS DTLS handshake reassembly logic lets remote unauthenticated attackers trigger an intege

CVE-2026-28367 CRITICAL
9.1 Mar 27

HTTP request smuggling in Undertow allows remote unauthenticated attackers to send `\r\r\r` as a header block terminator

CVE-2026-16526 HIGH
8.8 Jul 30

Local privilege escalation in Performance Co-Pilot (PCP) on Red Hat Enterprise Linux 6 through 10 and OpenShift Containe

Vendor StatusVendor

Share

EUVD-2026-45266 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy