---
id: CVE-2026-58380
title: A flaw was found in GIMP's PNM file format parser
summary: >-
  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…
severity: high
cvss: 7.3
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H'
cwe:
  - CWE-193
vendor: gimp
product: gimp
affected:
  - gimp = 3.2.4
  - enterprise_linux = 7.0
  - enterprise_linux = 8.0
  - enterprise_linux = 9.0
published: '2026-07-06'
updated: '2026-07-16'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-58380'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2026:40751'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/security/cve/CVE-2026-58380'
    label: secalert@redhat.com
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2496135'
    label: secalert@redhat.com
  - url: 'https://gitlab.gnome.org/GNOME/gimp/-/commit/83699817'
    label: secalert@redhat.com
  - url: 'https://gitlab.gnome.org/GNOME/gimp/-/issues/16206'
    label: secalert@redhat.com
tags:
  - nvd
epss: 0.00324
epssPercentile: 0.2278
ingestedAt: '2026-07-17T13:12:07.566Z'
---

## Overview

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.

## Affected

- `gimp = 3.2.4`
- `enterprise_linux = 7.0`
- `enterprise_linux = 8.0`
- `enterprise_linux = 9.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
