CVE-2026-66758 Gimp: integer overflow in file-fits plugin causes a heap-based buffer overflow on crafted fits images

High 7.8 Published Updated

An integer overflow in GIMP's FITS plugin allows attackers to trigger a heap buffer overflow via crafted images, potentially leading to code execution or crashes.

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

What is CVE-2026-66758?

CVE-2026-66758 is a high-severity vulnerability in Gimp Gimp, published on 27 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 the file-fits plugin in GIMP. When processing a FITS image file, the plugin calculates memory allocation sizes using signed 32-bit integers for width and height. If a crafted file sets both values to large values, their product exceeds 2^31 and overflows, resulting in an undersized heap-based buffer allocation. This integer overflow issue results in a heap-based buffer overflow when cfitsio subsequently writes a full row of pixels in the buffer, causing memory corruption, potentially leading to arbitrary code execution or a denial of service.

Weakness: CWE-190

Which versions are affected by CVE-2026-66758?

It affects 2 products.

Products include Gimp Gimp, Redhat Enterprise Linux.

How do I fix CVE-2026-66758?

Apply the vendor's patch.

Is CVE-2026-66758 being exploited?

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

All Gimp Gimp vulnerabilities

Sources

Also known as DEBIAN-CVE-2026-66758, GHSA-p2xc-g3qc-p2mq, UBUNTU-CVE-2026-66758.

Is CVE-2026-66758 in your software?

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

Check your SBOMs for free