Executive brief
GIMP is a widely used open-source image editor for professional photo retouching and image composition. A security vulnerability has been identified in how the application handles PGM image files, which could allow an attacker to take control of a user's computer. To exploit this, an attacker would need to trick a user into opening a specially crafted malicious image file or visiting a compromised website.
Technical details
A vulnerability (CWE-908) exists in GIMP's PGM (Portable Graymap) file parsing logic due to the use of uninitialized memory. Specifically, the application used 'g_malloc' instead of 'g_malloc0' when allocating memory for file parsing, leading to the use of unpredictable data from previous allocations. An attacker can craft a malicious PGM file that, when opened by a user, triggers this flaw to achieve remote code execution in the context of the GIMP process. The vulnerability was addressed by switching to zero-initialized memory allocation. Red Hat has released updates for RHEL 8 and 9 to mitigate this issue.
Affected products
- GNOME GIMP 2.8.22, 3.0.4
- Red Hat Enterprise Linux 8, 9
Timeline
- 2025-11-11: disclosed: Vulnerability reported to vendor via ZDI
- 2025-12-05: patched: Fix merged into GNOME GIMP master branch
- 2026-02-19: advisory: ZDI published advisory ZDI-26-118
- 2026-03-10: patched: Red Hat released security updates for RHEL 9
References
- https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/2569/diffs?commit_id=112a5e038f0646eae5ae314988ec074433d2b365
- https://www.zerodayinitiative.com/advisories/ZDI-26-118/
- https://access.redhat.com/errata/RHSA-2026:4173
- https://access.redhat.com/errata/RHSA-2026:5113
- https://access.redhat.com/errata/RHSA-2026:5388
- https://access.redhat.com/errata/RHSA-2026:5389
- https://access.redhat.com/errata/RHSA-2026:5390