CVE-2026-58380: Gimp: gimp: stack buffer overflow in pnmscanner_gettoken()

Published Jul 1, 2026
·
Updated

A flaw was found in GIMP's PNM file format parser. When parsing a specially crafted PNM file, the pnmscannergettoken() 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.

Other sources

An off-by-one stack buffer overflow exists in GIMP's PNM file format parser. In pnmscannergettoken() in file-pnm.c, the loop condition ctr < bufsize allows ctr to reach bufsize (512), then buf[ctr] = '\0' writes one byte past the 512-byte stack buffer. The function is called from pnmloadascii() with a stack-allocated buf[BUFLEN] where BUFLEN = 512, with no extra room for the null terminator.

- Function: pnmscannergettoken() - File: plug-ins/common/file-pnm.c:2103-2122 - Fix: https://gitlab.gnome.org/GNOME/gimp/-/commit/83699817 - Upstream issue: https://gitlab.gnome.org/GNOME/gimp/-/issues/16206 - Acknowledgment: bb1abu

Red Hat

Affected Software

5 affected components
GIMP
GIMP GIMP=3.2.4
redhat Enterprise Linux=7.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0

Event History

Jul 1, 2026
Data Sourced
via Red Hat·07:11 PM
DescriptionSeverityAffected Software
Jul 6, 2026
CVE Published
via MITRE·01:58 PM
Data Sourced
via MITRE·01:58 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-58380?

The severity of CVE-2026-58380 is rated as high, with a score of 7.8.

2

What does CVE-2026-58380 affect?

CVE-2026-58380 affects GIMP's PNM file format parser, specifically impacting systems running Red Hat Enterprise Linux.

3

How do I fix CVE-2026-58380?

To fix CVE-2026-58380, ensure you update to the latest patched version of GIMP that addresses this buffer overflow vulnerability.

4

What kind of vulnerability is CVE-2026-58380?

CVE-2026-58380 is a buffer overflow vulnerability that can lead to memory corruption.

5

Is my system at risk from CVE-2026-58380?

If you are using GIMP on Red Hat Enterprise Linux and have not applied the necessary patches, your system may be at risk from CVE-2026-58380.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203