CVE-2026-58380
Received Received - Intake

Buffer Overflow in GIMP PNM Parser

Vulnerability report for CVE-2026-58380, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-06

Last updated on: 2026-07-06

Assigner: Red Hat, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-06
Last Modified
2026-07-06
Generated
2026-07-06
AI Q&A
2026-07-06
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
gnome gimp to 512 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-193 A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-58380 is a security vulnerability in GIMP's PNM file format parser. It is caused by an off-by-one error in the pnmscanner_gettoken() function, where a null terminator is written one byte past the end of a stack-allocated buffer. This happens because the buffer has a fixed size of 512 bytes and the loop boundary check allows the index to reach the buffer size limit, causing a one-byte overflow.

This overflow can lead to memory corruption when processing specially crafted PNM files.

Impact Analysis

The vulnerability can lead to memory corruption, which may result in denial of service (crashes) or arbitrary code execution. This means an attacker could potentially execute malicious code on your system by tricking GIMP into processing a specially crafted PNM file.

Detection Guidance

This vulnerability is triggered when GIMP processes specially crafted PNM files that exploit a stack buffer overflow in the pnmscanner_gettoken() function. Detection involves monitoring for suspicious or malformed PNM files being opened or processed by GIMP.

Since the issue is related to file parsing within GIMP, network detection might focus on identifying the transfer or presence of suspicious PNM files.

No specific detection commands or signatures are provided in the available resources.

Mitigation Strategies

The primary mitigation step is to update GIMP to a version that includes the upstream fix for this vulnerability.

Until the update is applied, avoid opening or processing untrusted or suspicious PNM files with GIMP to prevent triggering the vulnerability.

Additionally, applying standard security practices such as running GIMP with least privileges and monitoring for abnormal crashes can help reduce risk.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-58380. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart