Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-10934

CVE-2025-10934: GIMP XWD File Parsing RCE Vulnerability

CVE-2025-10934 is a heap-based buffer overflow vulnerability in GIMP's XWD file parser that enables remote code execution. Attackers exploit this flaw by tricking users into opening malicious files to run arbitrary code.

Published:

CVE-2025-10934 Overview

CVE-2025-10934 is a heap-based buffer overflow [CWE-122] in the GNU Image Manipulation Program (GIMP) that enables arbitrary code execution when a user opens a crafted X Window Dump (XWD) file. The flaw resides in the XWD file parser, which fails to validate the length of attacker-controlled data before copying it into a heap buffer. Exploitation runs code in the context of the GIMP process on the local user account. The issue was reported through the Zero Day Initiative as ZDI-CAN-27823 and tracked publicly as ZDI-25-978. Affected packages include GIMP 3.0.4 and the GIMP package shipped in Debian GNU/Linux 11.

Critical Impact

A single malicious XWD image opened in GIMP can grant an attacker code execution as the current user, providing a foothold for credential theft, persistence, and lateral movement.

Affected Products

  • GIMP 3.0.4
  • Debian GNU/Linux 11 (GIMP package)
  • Downstream Linux distributions repackaging vulnerable GIMP builds

Discovery Timeline

  • 2025-10-29 - CVE-2025-10934 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-10934

Vulnerability Analysis

The vulnerability is a heap-based buffer overflow in the XWD image loader plug-in shipped with GIMP. XWD is a screen dump format produced by the xwd X11 utility, containing a header with width, height, colormap entry counts, and pixel data. The loader trusts size and length fields declared in the XWD header without bounds-checking them against the size of the heap buffer it allocates for parsed data. When attacker-controlled length values exceed the allocated buffer, the subsequent copy operation writes past the end of the heap chunk.

Exploitation requires user interaction. A target must open a malicious .xwd file, or open a file delivered through a webpage, email attachment, or shared directory. Because GIMP is widely associated with arbitrary image formats, victims have low suspicion of XWD inputs. Successful exploitation yields code execution under the user account running GIMP.

Root Cause

The root cause is missing validation of user-supplied length fields prior to a memcpy-style write into a heap allocation in the XWD parser. The upstream fix is applied in GNOME GIMP commit 5c3e2122d53869599d77ef0f1bdece117b24fd7c, which adds bounds checks during header processing in the XWD loader.

Attack Vector

The attack vector is local and requires user interaction. Delivery mechanisms include phishing emails with XWD attachments, drive-by downloads, malicious archives, and file shares. The vulnerability does not require network exposure of the host or any elevated privileges on the target. Refer to the Zero Day Initiative Advisory ZDI-25-978 for additional technical context.

No verified public proof-of-concept code is available at the time of writing.
Review the upstream commit and ZDI advisory for parser-level details.

Detection Methods for CVE-2025-10934

Indicators of Compromise

  • Unexpected child processes spawned by gimp or gimp-3.0 such as shells, curl, wget, or scripting interpreters.
  • .xwd files arriving via email, browser downloads, or shared drives, especially with unusual sizes or malformed XWD headers.
  • GIMP process crashes referencing the XWD plug-in (file-xwd) in core dumps or journalctl output.
  • Outbound network connections initiated by the GIMP process after opening an image.

Detection Strategies

  • Hunt for process lineage where gimp is the parent of interactive shells (/bin/sh, /bin/bash) or download utilities.
  • Inspect file-open telemetry for .xwd files originating from untrusted directories such as /tmp, browser download paths, or mail clients.
  • Correlate GIMP segmentation faults with subsequent process creation or filesystem writes outside the user's normal working directories.

Monitoring Recommendations

  • Enable EDR process-tree and file-write auditing on Linux endpoints where GIMP is installed.
  • Capture and review coredump events for GIMP across the fleet to surface attempted exploitation that does not succeed.
  • Track installed GIMP versions through software inventory to confirm patched packages are deployed on every host.

How to Mitigate CVE-2025-10934

Immediate Actions Required

Patch Information

The upstream GNOME GIMP project fixed the parser in commit 5c3e2122d53869599d77ef0f1bdece117b24fd7c by validating attacker-controlled length fields before the heap copy. Debian shipped a corresponding LTS update for the gimp package on Debian 11. Downstream distributions should rebuild and ship updated GIMP packages incorporating this commit.

Workarounds

  • Remove or disable the XWD loader plug-in (file-xwd) from the GIMP plug-ins directory until patched packages are installed.
  • Block delivery of .xwd attachments at the mail gateway and web proxy.
  • Run GIMP inside a sandboxed Flatpak or container profile to constrain the impact of code execution within the GIMP process.
bash
# Debian/Ubuntu: update GIMP to a patched build
sudo apt update
sudo apt install --only-upgrade gimp

# Verify the installed version after upgrade
dpkg -s gimp | grep -E '^(Package|Version):'

# Temporary mitigation: remove the XWD loader plug-in
sudo rm -f /usr/lib/gimp/3.0/plug-ins/file-xwd/file-xwd

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.