CVE-2026-16118: Heap-based Buffer Overflow in xdg xdgmime
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.
AI Analysis
Technical Summary
The vulnerability in xdgmime arises from a heap-based buffer overflow triggered in the _xdg_mime_magic_parse_magic_line() function within xdgmimemagic.c on little-endian systems. When an application performs MIME type detection (e.g., via g_content_type_guess()) and parses a crafted MIME magic file placed by an attacker in a user-writable XDG data location (such as $XDG_DATA_HOME/mime/magic), incorrect pointer arithmetic during byte-swapping leads to a 2-byte out-of-bounds write. This can cause application crashes or memory corruption. The vulnerability requires local access to place the malicious MIME magic file and user interaction to trigger parsing. The CVSS vector indicates low attack complexity, no privileges required, but user interaction is needed, with no confidentiality impact but high integrity and availability impact.
Potential Impact
Successful exploitation can cause application crashes or memory corruption due to a heap-based buffer overflow. This may lead to denial of service or potentially allow an attacker to alter application behavior or memory contents, impacting integrity and availability. There is no indication of confidentiality impact. Exploitation requires local ability to write attacker-controlled MIME magic files and user interaction to trigger MIME type detection parsing.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory at https://access.redhat.com/security/cve/CVE-2026-16118 for current remediation guidance. Until an official fix is available, avoid running applications that perform MIME type detection on untrusted or user-writable XDG data locations. Restrict write permissions to XDG data directories to trusted users only. Monitor the vendor advisory for updates on patches or official mitigations.
CVE-2026-16118: Heap-based Buffer Overflow in xdg xdgmime
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.
CVSS v3.1
Score 7.1high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in xdgmime arises from a heap-based buffer overflow triggered in the _xdg_mime_magic_parse_magic_line() function within xdgmimemagic.c on little-endian systems. When an application performs MIME type detection (e.g., via g_content_type_guess()) and parses a crafted MIME magic file placed by an attacker in a user-writable XDG data location (such as $XDG_DATA_HOME/mime/magic), incorrect pointer arithmetic during byte-swapping leads to a 2-byte out-of-bounds write. This can cause application crashes or memory corruption. The vulnerability requires local access to place the malicious MIME magic file and user interaction to trigger parsing. The CVSS vector indicates low attack complexity, no privileges required, but user interaction is needed, with no confidentiality impact but high integrity and availability impact.
Potential Impact
Successful exploitation can cause application crashes or memory corruption due to a heap-based buffer overflow. This may lead to denial of service or potentially allow an attacker to alter application behavior or memory contents, impacting integrity and availability. There is no indication of confidentiality impact. Exploitation requires local ability to write attacker-controlled MIME magic files and user interaction to trigger MIME type detection parsing.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory at https://access.redhat.com/security/cve/CVE-2026-16118 for current remediation guidance. Until an official fix is available, avoid running applications that perform MIME type detection on untrusted or user-writable XDG data locations. Restrict write permissions to XDG data directories to trusted users only. Monitor the vendor advisory for updates on patches or official mitigations.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- redhat
- Date Reserved
- 2026-07-17T15:50:21.345Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-16118","vendor":"Red Hat"}]
Threat ID: 6a5b5eae2d1edb114c7fb30d
Added to database: 07/18/2026, 11:08:30 UTC
Last enriched: 08/02/2026, 20:31:42 UTC
Last updated: 09/01/2026, 10:52:07 UTC
Views: 70
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.