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

CVE-2025-10921: GIMP HDR File Parsing RCE Vulnerability

CVE-2025-10921 is a heap-based buffer overflow RCE flaw in GIMP's HDR file parser that allows remote attackers to execute arbitrary code. This article covers the technical details, affected versions, impact, and mitigation.

Published:

CVE-2025-10921 Overview

CVE-2025-10921 is a heap-based buffer overflow in GIMP's High Dynamic Range (HDR) file parser that allows attackers to execute arbitrary code in the context of the current user. The flaw exists in the GEGL image processing library used by GIMP and is tracked by the Zero Day Initiative as ZDI-CAN-27803. Exploitation requires user interaction: the target must open a crafted HDR file or visit a page that delivers one. The vulnerability is categorized under [CWE-122] Heap-based Buffer Overflow and [CWE-787] Out-of-bounds Write.

Critical Impact

A crafted HDR image opened in GIMP can trigger arbitrary code execution with the privileges of the user running the application, enabling local compromise of workstations used by designers, photographers, and developers.

Affected Products

  • GIMP 3.0.4
  • GEGL (GNOME image processing library used by GIMP)
  • Debian Linux 11.0 (GIMP package shipped via Debian LTS)

Discovery Timeline

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

Technical Details for CVE-2025-10921

Vulnerability Analysis

The vulnerability lives in the HDR image loader implemented in GEGL, the graph-based image processing library that backs GIMP's file format handlers. When GIMP opens a Radiance HDR image, the loader reads header fields and pixel scanline data from the file and copies that data into a heap-allocated buffer. The loader does not properly validate the length of attacker-controlled fields before performing the copy operation.

Because the destination buffer is sized based on assumptions about well-formed HDR input, oversized or malformed scanline records write past the end of the allocation. The out-of-bounds write corrupts adjacent heap metadata and application objects, which an attacker can shape to gain control of the instruction pointer and execute arbitrary code in the GIMP process.

Root Cause

The root cause is missing bounds validation on user-supplied length values parsed from HDR file headers and run-length-encoded scanlines. The vendor fix in GEGL commit 0e68b7471dabf2800d780819c19bd5e6462f565f adds explicit checks against attacker-controlled sizes before data is written into the heap buffer.

Attack Vector

The attack vector is local and requires user interaction. An attacker delivers a malicious .hdr file through email, chat, a website download, or a shared project folder. When the victim opens the file in GIMP or previews it through a GEGL-backed integration, the parser triggers the overflow and the embedded payload runs with the user's privileges.

No synthetic exploit code is reproduced here. Technical detail on the parsing flaw is available in Zero Day Initiative Advisory ZDI-25-910 and the upstream GEGL patch.

Detection Methods for CVE-2025-10921

Indicators of Compromise

  • Crashes or unexpected child processes spawned by gimp or gimp-3.0 shortly after opening an HDR image
  • HDR files (.hdr, .pic) delivered from untrusted origins with unusually large header fields or scanline records
  • GIMP processes initiating outbound network connections, which is uncommon for typical image editing workflows
  • Shell, python, or scripting interpreters launched as children of the GIMP process

Detection Strategies

  • Monitor process lineage for gimp spawning interpreters, curl, wget, or other living-off-the-land binaries
  • Inspect HDR files at email and web gateways for malformed Radiance headers prior to delivery
  • Alert on writes to user persistence locations (autostart directories, shell profile files) by the GIMP process
  • Correlate GIMP crash telemetry with subsequent suspicious activity on the same host

Monitoring Recommendations

  • Enable core dump and crash reporting for desktop applications on Linux workstations
  • Track installed GIMP and GEGL package versions across the fleet through software inventory tooling
  • Forward endpoint process and file telemetry to a central data lake for retrospective hunting across HDR file opens

How to Mitigate CVE-2025-10921

Immediate Actions Required

  • Update GIMP and the GEGL library to the patched versions distributed by your operating system vendor
  • On Debian 11 systems, apply updates from the Debian LTS announcement for October 2025
  • Block delivery of .hdr and .pic files from untrusted senders at the email gateway until patches are deployed
  • Instruct users not to open HDR files from unknown sources, including project archives and shared drives

Patch Information

The upstream fix is committed to GEGL as commit 0e68b7471dabf2800d780819c19bd5e6462f565f. Debian has published a corresponding LTS update for the GIMP packages on Debian 11. Other distributions are tracking the GEGL fix and rebuilding GIMP accordingly. Refer to ZDI-25-910 for vendor coordination details.

Workarounds

  • Disable the HDR/Radiance file format plugin in GIMP until the patched GEGL package is installed
  • Run GIMP inside a sandbox such as Flatpak with restricted filesystem and network permissions when handling untrusted images
  • Use a non-privileged account dedicated to opening externally sourced image files to limit blast radius
bash
# Verify installed GIMP and GEGL versions on Debian-based systems
dpkg -l | grep -E 'gimp|gegl'

# Apply security updates on Debian 11 (LTS)
sudo apt update
sudo apt install --only-upgrade gimp libgegl-0.4-0

# Confirm the patched package version is installed
apt-cache policy libgegl-0.4-0

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.