CVE-2026-18304
Executive Summary
CVE-2026-18304 is a remote code execution vulnerability in GIMP's TIF (Tagged Image File Format) file parsing routine. The flaw stems from an integer overflow condition that occurs due to insufficient validation of user-supplied data during buffer allocation, which can be exploited by an attacker to achieve code execution in the context of the current process. The attack vector requires user interaction — the victim must open a malicious TIF file or visit a page that triggers file processing. Successful exploitation grants an attacker full control over the target system with the privileges of the logged-in user, making this a high-priority risk for any organization deploying GIMP on end-user workstations. Patches have been confirmed by multiple independent sources.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
The vulnerability resides in the TIFF file-format parsing module of GIMP. TIFF is a flexible, tag-based image format that supports a wide variety of compression schemes, bit depths, and color models. Part of the format's flexibility is its use of offset/value fields that describe where pixel data, strip offsets, or tile data reside within the file.
The specific flaw is an integer overflow before buffer allocation. During parsing, GIMP computes the size of a destination buffer based on values read from the TIF file (e.g., image width, height, samples-per-pixel, or strip/tile byte counts). An integer overflow occurs when the arithmetic operation that calculates the required buffer size produces a value that exceeds the maximum representable integer for the data type used (typically a 32-bit unsigned int or size_t). Because the code lacks proper validation of these user-supplied dimension/offset values, a crafted TIF file can cause the buffer-size calculation to wrap around to a small (or even zero) value.
When such an overflow occurs, GIMP then allocates a buffer of the overflown (undersized) size. Subsequent read operations assume the buffer is large enough to hold the declared data and write past the allocated boundary, resulting in a heap-based buffer overflow. An attacker who controls the contents of the TIF file thereby controls the overflow data, which can be leveraged to corrupt adjacent heap metadata or overwrite function pointers — ultimately redirecting execution flow to attacker-controlled code (e.g., shellcode embedded within the malformed image file or loaded subsequently from memory).
This vulnerability class (CWE-190 — Integer Overflow or Wraparound) combined with heap-buffer-overflow consequences is a well-understood and commonly weaponized pattern. The "specific flaw exists within the parsing of TIF files" and is not tied to a particular function or line of code in the public disclosure, so precise vulnerable-function-level detail is not available. However, the attack surface is clear: any code path in GIMP that ingests a TIF file and computes an allocation size based on TIF-supplied dimension/strip/offset fields is suspect.
The CVSS vector (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) reflects that GIMP is a local, interactive application. The Local attack vector is contextual — the user must be coaxed into opening a file from a remote source — but no prior authentication or special privileges are required. The impact is High across confidentiality, integrity, and availability because code execution in the user's context permits reading the user's files, modifying or encrypting data, and potentially escalating via local privilege escalation chained on top.
The absence of a public PoC and lack of CISA KEV listing indicate that, as of report time, no in-the-wild exploitation has been observed. However, file-parser RCEs in widely deployed applications such as GIMP — historically a target for both research (e.g., via Pwn2Own-style contests) and malware distribution — should be treated with a high degree of suspicion given that zero-day chaining of such flaws frequently follows public disclosure.
Exploitation Scenarios
The attack chain follows the classic client-side file-parsing exploitation pattern:
Reconnaissance / Target Identification The attacker seeks to compromise an end-user workstation running GIMP. Target selection may be broad (malicious image distributed via email, instant messaging, or drive-by download) or more surgical (phishing a specific individual known to use image-editing tools — designers, digital artists, marketing staff). Reconnaissance may identify the GIMP version installed (e.g., via
aboutdialog screenshots shared on social channels, browser user-agent strings related to GIMP-related plugins, or simply a known enterprise software baseline).Flaw Triggering / Malicious File Delivery The attacker crafts a TIF file with a structure designed to trigger the integer overflow in buffer-size calculation. Since the flaw triggers during parse — before any image rendering occurs — a mere preview or thumbnail-generation pass is sufficient to reach the vulnerable code. Delivery vectors include:
- Email attachment with the malicious
.tifor.tifffile. - Malicious page visited by the user (the NVD description explicitly notes "target must visit a malicious page" — likely a page that automatically invokes an image parser, or a browser plugin/helper that delegates TIF rendering to GIMP).
- Download from a compromised website or content-distribution network.
- Social-engineering lures presenting the image as a picture of a contact, a business document, or artwork.
- Email attachment with the malicious
Payload Execution / Code Execution at Vulnerability-Class Level At the vulnerability-class level, integer-overflow-to-buffer-overflow allows the attacker to write data of their choosing beyond the intended heap allocation. The typical exploitation sequence involves heap grooming to arrange adjacent allocations such that the overflow overwrites an object pointer, function pointer, or metadata used in a subsequent free or allocation operation — a classic "heap overflow to arbitrary write" primitive. The attacker can then redirect execution to a payload already staged in the file's memory (e.g., within embedded TIFF tags or extra data fields) or to a ROP chain that disables NX/DEP. Since GIMP links against platform libraries, metering shellcode may first call OS APIs to mark memory executable or pivot stacks before executing a full implant (reverse shell, dropper, credential stealer, etc.). User interaction required is minimal: open the file.
Post-Exploitation Impact With code execution in the context of the current process (the user running GIMP), the attacker inherits that user's privileges. Typical outcomes:
- Data theft — accessing local documents, browser-stored credentials, email caches.
- Persistence — installing a user-land backdoor, modifying shell profiles, autostart entries.
- Lateral movement preparation — collecting credentials for network services, placing keyloggers.
- Ransomware-style encryption (if the target is high-value). If the vulnerable GIMP instance runs with elevated privileges (uncommon but possible in certain managed environments), the impact scales accordingly.
It is important to note: no public PoC is available, so the specific heap layout and primitive achieved are inferred from the described vulnerability class, not from any observed exploit. Organizations should nonetheless assume a working exploit will surface quickly given the relative simplicity of integer-overflow-to-overflow chains and the public nature of the ZDI advisory (ZDI-CAN-29403).
Impact Assessment
Business Impact: High. This vulnerability allows remote, unauthenticated code execution on any workstation running a vulnerable GIMP build, requiring only that a user open a malicious image file. The CVSS base score of 7.8 reflects a high-severity issue where exploitation is straightforward (AC:L), requires no privileges (PR:N), and yields high impact on confidentiality, integrity, and availability.
Affected Systems: All GIMP installations that parse TIF files. Given GIMP is a popular open-source image editor deployed across Linux, Windows, and macOS, this represents a broad cross-platform risk. The OSV reference marks the state as vulnerable via point-in-time patch comparison with no specific version list, meaning the vulnerability likely persists across a wide range of pre-fix releases.
Blast Radius:
- Users who double-click malicious TIF attachments from untrusted email filters or websites are at direct risk.
- Enterprise environments where GIMP is part of the standard toolset for creative teams face exposure across potentially hundreds of seats.
- Linux distributions that package GIMP (Debian, Red Hat Enterprise Linux, Fedora, Ubuntu) are affected, with Debian and RHSA listed among the patch sources.
- The vulnerability's local AV classification does not reduce risk meaningfully because user interaction is the primary trigger.
CVSS Subscore Notes: The vector indicates no privilege requirements (PR:N) and no user interaction reduction beyond the "Required" classification (UI:R), which reflects that a single user action is needed. Scope is Unchanged (S:U) — the compromised component (GIMP) stays within its security authority. The elevated impact scores (C:H/I:H/A:H) align with arbitrary code execution under the target user's account.
Detection Guidance
Sigma Rule
title: GIMP TIF Parsing Integer Overflow — Suspicious TIF File Access
id: 78d3a2d0-84bd-4c9a-bc79-c8dd84a97fa0
status: experimental
description: >
Detects suspicious GIMP TIF file processing that may indicate exploitation
of CVE-2026-18304 (integer overflow before buffer allocation).
logsource:
category: process_creation
product: windows
definition: Commercial EDR products
detection:
selection_gimp_launch:
Image|endswith: '\\gimp.exe'
selection_tif_cli:
CommandLine|contains|all:
- '.tif'
- '.tiff'
selection_tif_open:
- Image|endswith: '\\gimp.exe'
- CommandLine|contains: 'file://' # possible browser-initiated file launch
filter_normal_usage:
CommandLine|contains:
- '-i' # GIMP scripting mode without GUI
- '--no-interface'
condition: (selection_gimp_launch and selection_tif_cli) or selection_tif_open and not filter_normal_usage
timeframe: 30s
level: high
falsepositives:
- Legitimate designer workflows involving TIF files
- Automated image processing scripts using TIF files
tags:
- attack.t1204
- attack.initial-access
- cwe.190
- cve.2026-18304
YARA Rule
rule CVE_2026_18304_GIMP_TIF_Suspicious
{
meta:
author = "valtersit.com Threat Intel"
date = "2026-06-11"
description = "Detects suspicious TIF files associated with GIMP CVE-2026-18304 integer overflow exploitation"
cve = "CVE-2026-18304"
weight = 60
strings:
// TIFF header magic bytes (Little Endian and Big Endian)
$tiif_le = { 49 49 2A 00 }
$tiif_be = { 4D 4D 00 2A }
// Suspiciously large dimensions (width/height commonly implicated)
// These are raw big-endian 32-bit values.
$large_dim_le = { FF FF FF 7F }
$large_dim_be = { 7F FF FF FF }
// Common TIF tags related to strip/tile byte counts
$tag_strip_bytes_1 = { 17 01 00 04 } // TIFF tag 0x0117 (StripByteCounts)
$tag_tile_bytes = { 44 01 00 04 } // TIFF tag 0x0144 (TileByteCounts)
condition:
uint16(0) == 0 or (
($tiif_le at 0 or $tiif_be at 0) and
(
$large_dim_le or $large_dim_be
or (
$tag_strip_bytes_1 or $tag_tile_bytes
)
)
and filesize < 50MB // Legitimate large TIFs exist but are rare in email/weaponized context
)
}
Suricata IDS Rule
alert http any any -> $HOME_NET any (msg:"CVE-2026-18304 GIMP TIF Parsing Integer Overflow — Suspicious File Download"; flow:established,to_client; file.name:/\.(tif|tiff)$/i; content:"II",offset:0,depth:2,nocase; content:"|2A 00|",offset:2,depth:2; byte_test:4,>,268435456,10,big,little; metadata:... )
Note: The above Suricata rule is intentionally simplified. Crafting reliable file-based network signatures for TIF parsing vulnerabilities is prone to evasion (encryption, compression, alternate MIME transports). More robust detection at the network layer involves file extraction (Suricata file-store) followed by static analysis on a sandbox/AV. Enterprises should rely primarily on end-point detection rather than pure network signatures.
Elastic Detection
{
"query": {
"bool": {
"should": [
{
"term": {
"process.name": "gimp.exe"
}
},
{
"term": {
"process.executable": "gimp"
}
}
],
"filter": [
{
"bool": {
"must_not": [
{
"term": {
"process.parent.name": "explorer.exe"
}
}
]
}
},
{
"range": {
"@timestamp": {
"gte": "now-5m"
}
}
}
]
}
}
}
An additional EQL correlation would flag GIMP crashes immediately followed by module loads from non-standard paths (a common post-exploitation indicator):
sequence by process.pid
[ process where process.name == "gimp.exe" and event.type == "info" ]
[ file where process.name == "gimp.exe" and event.action in ("creation", "modification") ]
Splunk SPL Query
index=windows_events OR index=endpoint
| where process_name IN ("gimp.exe", "gimp-2.10.exe", "gimp-2.99.exe")
| eval cli_file = if(match(CommandLine, "(?i)\.(tif|tiff)"), "TIF", if(match(CommandLine, "(?i)\.(png|jpg|jpeg|bmp)"), "Other_Image", "Non_Image"))
| stats count by host, user, process_name, cli_file, parent_process_name
| where cli_file == "TIF"
| table _time, host, user, process_name, count, parent_process_name
Optionally detect application crash events that may follow heap corruption:
index=windows_events EventCode IN (1000, 1001)
| where Message LIKE "%gimp%"
| head 50
Wazuh OSSEC Rule
<group name="gimp,">
<rule id="100423" level="12">
<if_sid>530</if_sid>
<match>gimp</match>
<regex>(\.tif|\.tiff)</regex>
<description>GIMP process invocation with TIF file argument — potential CVE-2026-18304 exploitation vector.</description>
<group>cve-2026-18304,</group>
<mitre>
<id>T1204</id>
</mitre>
</rule>
</group>
Mitigation & Patch Guidance
Patch Confidence: 4/4 (CONFIRMED) — Fix independently confirmed by NVD, Debian, and RHSA.
Immediate Mitigations
- If GIMP is not essential, remove it from all workstations until the patched version is tested and deployed.
- Enable file-type allowlisting via email gateway/AV to block
.tif/.tiffattachments at the perimeter. - Configure browsers and image viewers not to auto-open or auto-preview external TIF files.
- On Linux, consider running GIMP under an unprivileged container or sandbox (bwrap, firejail) as a temporary measure.
- Educate users on not opening unexpected image attachments; review any embedded images on quarantine systems first.
Patch/Upgrade Steps
- Monitor the GIMP official release channel for a version fixing ZDI-CAN-29403/CVE-2026-18304. Apply the update immediately upon release.
- Debian and Red Hat users: apply the patched package as soon as it is available via
apt upgrade gimpordnf upgrade gimprespectively; reference the RHSA advisory for precise version numbers. - For package managers tracking the OSV record, update once the referenced resolving commit (post-476407cd1ba693501c435b6200f877e1ff278627) lands in a tagged release.
- Validate patch deployment by confirming GIMP reports a version newer than the vulnerable builds identified by the OSV/Patch sources.
Long-Term Hardening
- Establish a minimum software baseline for image editors in the enterprise; GIMP versions older than the patched release should be blocked by application-control policies.
- Integrate GIMP version checks into vulnerability-scanning workflows (Qualys, Nessus, Wazuh SCA).
- Apply OS-level mitigations (ASLR, DEP, heap randomization) — these raise the difficulty of exploitation but are not sufficient alone.
- Maintain a registry of third-party open-source tools used by creative teams; ensure they are included in the vulnerability-management lifecycle and not treated as "unofficial software."
References
- NVD — CVE-2026-18304: https://nvd.nist.gov/vuln/detail/CVE-2026-18304
- Zero Day Initiative — ZDI-CAN-29403 (referenced in advisory; publication of the full ZDI-25-XXXX advisory expected following coordinated disclosure)
- OSV record for GIMP package (commit 476407cd1ba693501c435b6200f877e1ff278627): https://osv.dev/vulnerability/CVE-2026-18304
- Debian Security Tracker — CVE-2026-18304 (patch source/confirmation): https://security-tracker.debian.org/tracker/CVE-2026-18304
- Red Hat Security Advisory (RHSA) — CVE-2026-18304 (patch source/confirmation): search.redhat.com/s/?q=CVE-2026-18304
Exploit in-the-wild evidence: As of this reporting, CVE-2026-18304 is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog, and no public exploit code or Nuclei template has been observed. The absence of a public PoC at publication time should not be interpreted as low risk; ZDI-disclosed client-side parsers routinely attract exploit developers within weeks. Constant vigilance is required, particularly for countries/regions where GIMP has a large creative-professional user base.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.