Description
A flaw was found in GIMP's PNM file format parser. When parsing a specially crafted PNM file, the pnmscanner_gettoken() function writes a null terminator one byte past the end of a stack-allocated buffer due to an off-by-one error in the loop boundary check. This could lead to memory corruption, potentially resulting in denial of service or arbitrary code execution.
Published: 2026-07-06
Score: 7.3 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A stack buffer overflow in GIMP’s PNM file format parser occurs in the pnmscanner_gettoken() function when it writes a null terminator one byte past the end of a stack‑allocated buffer due to an off‑by‑one error. This flaw can corrupt memory and may lead to a denial of service or even arbitrary code execution, depending on how the attacker crafts the PNM file and the privileges of the process reading it.

Affected Systems

The vulnerability affects the GNOME GIMP application bundled with Red Hat Enterprise Linux 6, 7, 8 and 9. All versions of GIMP that contain the unpatched pnmscanner_gettoken() routine are impacted; the specific package versions are not listed, but any RHEL distribution containing the vulnerable GIMP release is vulnerable.

Risk and Exploitability

The CVSS score of 7.3 indicates a high severity, while the EPSS score of less than 1% suggests a very low but nonzero exploitation probability, and the flaw is not currently listed in the CISA KEV catalog. The required input is a specially crafted PNM file, so the attack vector is likely local or remote if the application is exposed to untrusted files. An attacker would need the ability to provide a PNM file to the application and, if the process runs with elevated privileges, could potentially gain code execution. The lack of an official workaround underscores the importance of applying a patch.

Generated by OpenCVE AI on July 10, 2026 at 07:08 UTC.

Remediation

Vendor Workaround

None — requires opening a crafted PNM file.


OpenCVE Recommended Actions

  • Upgrade the GIMP package to the version that incorporates the GNOME patch identified by commit 83699817, as provided by Red Hat in the latest update stream.
  • Re‑run GIMP under a non‑privileged user and restrict its file‑system access to trusted directories; disable the PNM plugin if the format is not required.
  • If an immediate patch is not feasible, apply host‑based confinement such as SELinux or AppArmor to block execution of the GIMP process from untrusted PNM files, or monitor for and block the loading of any PNM files from external sources.

Generated by OpenCVE AI on July 10, 2026 at 07:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 06 Jul 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Gnome
Gnome gimp
Vendors & Products Gnome
Gnome gimp

Mon, 06 Jul 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 06 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Description A flaw was found in GIMP's PNM file format parser. When parsing a specially crafted PNM file, the pnmscanner_gettoken() function writes a null terminator one byte past the end of a stack-allocated buffer due to an off-by-one error in the loop boundary check. This could lead to memory corruption, potentially resulting in denial of service or arbitrary code execution.
Title Gimp: gimp: stack buffer overflow in pnmscanner_gettoken()
First Time appeared Redhat
Redhat enterprise Linux
Weaknesses CWE-193
CPEs cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
References
Metrics cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Gnome Gimp
Redhat Enterprise Linux
cve-icon MITRE

Status: PUBLISHED

Assigner: redhat

Published:

Updated: 2026-07-06T15:41:15.008Z

Reserved: 2026-06-30T16:54:04.312Z

Link: CVE-2026-58380

cve-icon Vulnrichment

Updated: 2026-07-06T15:41:09.396Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-10T07:15:04Z

Weaknesses