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

CVE-2025-10922: GIMP DCM File Parsing RCE Vulnerability

CVE-2025-10922 is a heap-based buffer overflow in GIMP's DCM file parser that enables remote code execution. Attackers exploit this by tricking users into opening malicious files. This article covers technical details, impact, and mitigations.

Published:

CVE-2025-10922 Overview

CVE-2025-10922 is a heap-based buffer overflow in GIMP's DCM (DICOM) file parser. Attackers can execute arbitrary code in the context of the current user by tricking the victim into opening a crafted DCM file or visiting a malicious page that delivers one. The flaw was reported through the Zero Day Initiative as ZDI-CAN-27863 and published as advisory ZDI-25-911. The vulnerability affects GIMP 3.0.4 and Debian Linux distributions that ship the affected GIMP package. The weaknesses map to [CWE-122] (heap-based buffer overflow) and [CWE-787] (out-of-bounds write).

Critical Impact

Successful exploitation grants arbitrary code execution under the privileges of the user running GIMP, enabling local code execution from a single opened image file.

Affected Products

  • GIMP 3.0.4
  • Debian Linux 11.0 (GIMP package via Debian LTS)
  • Downstream Linux distributions packaging the vulnerable GIMP build

Discovery Timeline

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

Technical Details for CVE-2025-10922

Vulnerability Analysis

The vulnerability resides in the routine GIMP uses to parse DICOM (.dcm) medical imaging files. When the loader reads attributes from a DCM data element, it copies user-supplied bytes into a heap-allocated buffer without first verifying that the declared length fits the destination. A specially crafted DCM file can declare an element length that exceeds the allocation, producing an out-of-bounds write on the heap.

Because GIMP runs in the user's session, an overflow in this parser corrupts heap metadata and adjacent allocations within the application process. An attacker who controls the overflowing bytes can hijack control flow and execute arbitrary native code. Exploitation requires user interaction: the victim must open the malicious file or visit a page that triggers an associated handler. The attack vector is local, but DCM files are commonly transferred over email, chat, and the web.

The upstream fix is committed in the GIMP repository at commit 3d909166463731e94dfe62042d76225ecfc4c1e4, which adds length validation before the copy operation. See the GNOME GIMP commit and the Zero Day Initiative advisory ZDI-25-911 for technical details.

Root Cause

The DCM parser trusts attacker-controlled length fields embedded in the file format. It allocates a heap buffer based on one value and then copies a larger user-supplied payload into it, violating the buffer boundary. This is a classic missing bounds check ahead of a memcpy-style operation.

Attack Vector

An attacker delivers a malicious .dcm file through email, file share, or a drive-by web page that prompts the user to open it in GIMP. Once GIMP parses the file, the overflow triggers and arbitrary code runs as the current user. No elevated privileges are required.

No public proof-of-concept exploit is currently linked from NVD or ZDI for this issue. Refer to the Debian LTS announcement for distribution-specific information.

Detection Methods for CVE-2025-10922

Indicators of Compromise

  • Unexpected child processes spawned by gimp or gimp-3.0 shortly after opening a .dcm file.
  • Crash artifacts, core dumps, or SIGSEGV events tied to GIMP's DICOM plug-in.
  • Inbound .dcm attachments or downloads on systems where DICOM workflows are not expected.

Detection Strategies

  • Monitor process lineage for GIMP spawning shells, scripting interpreters, or network utilities such as bash, python, curl, or nc.
  • Inspect endpoint telemetry for heap corruption signatures (ASan/Glibc abort messages referencing GIMP) in user session logs.
  • Hunt for newly created executables, cron entries, or systemd user units written immediately after GIMP opens a DCM file.

Monitoring Recommendations

  • Alert on file writes to ~/.config/autostart/, ~/.local/bin/, and shell rc files following GIMP execution.
  • Track outbound network connections initiated by the GIMP process tree, which should be rare in normal use.
  • Centralize endpoint logs from Linux desktops to enable retroactive hunting for DCM-driven anomalies.

How to Mitigate CVE-2025-10922

Immediate Actions Required

  • Upgrade GIMP to a build that includes upstream commit 3d909166463731e94dfe62042d76225ecfc4c1e4.
  • On Debian, apply the GIMP update from the Debian LTS security announcement.
  • Inventory workstations that have GIMP 3.0.4 installed and prioritize patching systems handling untrusted image files.

Patch Information

The GIMP project fixed the heap overflow in commit 3d909166463731e94dfe62042d76225ecfc4c1e4, available from the GNOME GIMP repository. Debian users should install the updated gimp package distributed through Debian LTS. The Zero Day Initiative tracks the issue as ZDI-25-911.

Workarounds

  • Do not open .dcm files from untrusted sources until GIMP is patched.
  • Disassociate the .dcm MIME type from GIMP in the desktop environment to prevent automatic handling.
  • Run GIMP under a restricted user account or sandbox such as Flatpak or firejail to limit the impact of code execution.
bash
# Configuration example: remove DCM association and verify patched version
xdg-mime default org.gnome.gedit.desktop application/dicom
dpkg -l gimp | awk '/^ii/ {print $2, $3}'
# Run GIMP in a restrictive sandbox when handling untrusted images
firejail --net=none --private-tmp gimp /path/to/untrusted.dcm

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.