Junglewise Threat Intelligence

CVE-2026-58380: GNOME GIMP stack buffer overflow in PNM file parser

CVE-2026-58380 · Severity: high · CVSS 7.3 · Published 2026-07-06

Technologies: Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, Red Hat Enterprise Linux 7. Vendors: Red Hat, Gnome.

Executive brief

GIMP, a popular open-source image editor, contains a vulnerability in how it processes certain image files (PNM format). If a user is tricked into opening a specially crafted image file, the application may crash or allow an attacker to execute malicious code on the system. This could lead to a full compromise of the user's workstation and unauthorized access to their data.

Technical details

An off-by-one error exists in the PNM file format parser within GIMP's 'file-pnm.c' component. Specifically, the 'pnmscanner_gettoken()' function uses a loop boundary check (ctr < bufsize) that allows the counter to reach the full size of a 512-byte stack-allocated buffer. When the function subsequently appends a null terminator at 'buf[ctr]', it writes one byte past the end of the buffer. This stack-based buffer overflow can be triggered by a PNM file containing a token of exactly 512 non-whitespace characters. An attacker can exploit this to cause memory corruption, leading to a denial of service or potential arbitrary code execution under the context of the user running GIMP. A fix has been committed to the upstream GNOME repository.

Affected products

  • GNOME GIMP 3.2.1
  • Red Hat Red Hat Enterprise Linux 7
  • Red Hat Red Hat Enterprise Linux 8
  • Red Hat Red Hat Enterprise Linux 9

Timeline

  • 2026-07-01: disclosed: Reported via Red Hat Bugzilla
  • 2026-07-06: advisory: NVD publication date
  • 2026-07-06: patched: Upstream commit 83699817 released

References