CVE-2026-42170
gimp: GIMP DDS plug-in heap-based buffer overflow via BPP mismatch in load_layer() (ddsread.c)
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · August 4, 2026
Updated · November 5, 2026
Description
A heap-based buffer overflow vulnerability exists in the GIMP DDS (DirectDraw Surface) file parser. When a crafted DDS file declares a D3D9 pixel format but sets a lower bits-per-pixel (bpp) value in the header, the loader allocates an undersized heap buffer. Subsequent pixel data consumption at the real format's stride causes a write past the heap buffer boundary, leading to heap metadata corruption and potential code execution.
Statement
This heap-based buffer overflow vulnerability in the GIMP DDS plug-in could lead to heap metadata corruption and potential code execution. The flaw is triggered when a user opens a specially crafted DDS image file. Red Hat Enterprise Linux systems with GIMP installed are affected if users process untrusted DDS files.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Users should avoid opening untrusted DirectDraw Surface (DDS) image files with GIMP. As a general security practice, only process files from trusted sources. If GIMP is not essential, consider removing the gimp package to eliminate this attack vector.
CVSS / CWE
CVSS 3.1 · 7.8CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CWE-131 · Incorrect Calculation of Buffer Size