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

High 7.3 Published Updated

An off-by-one error in GIMP's PNM parser allows attackers to cause memory corruption, leading to denial of service or arbitrary code execution via crafted files.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-58380?

CVE-2026-58380 is a high-severity memory corruption vulnerability in Gimp Gimp, published on 6 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-193

Which versions are affected by CVE-2026-58380?

It affects 2 products.

Products include Gimp Gimp, Redhat Enterprise Linux.

How do I fix CVE-2026-58380?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-58380 being exploited?

There is no known exploitation of CVE-2026-58380 in the wild and no public exploit code.

All Gimp Gimp vulnerabilities

Sources

Also known as DEBIAN-CVE-2026-58380, GHSA-c7fj-r3pq-5ph5, UBUNTU-CVE-2026-58380.

Is CVE-2026-58380 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free