CVE-2026-66758: Gimp: integer overflow in file-fits plugin causes a heap-based buffer overflow on crafted fits images
A flaw was found in the file-fits plugin in GIMP, affecting all versions. 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.
Other sources
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.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-66758?
CVE-2026-66758 has a severity rating of high with a score of 7.8.
How do I fix CVE-2026-66758?
To fix CVE-2026-66758, update GIMP to the latest version that addresses this vulnerability.
What type of vulnerability is CVE-2026-66758?
CVE-2026-66758 is categorized as a buffer overflow vulnerability caused by an integer overflow.
What impact does CVE-2026-66758 have on GIMP users?
CVE-2026-66758 can lead to a heap-based buffer overflow, potentially allowing for arbitrary code execution.
Which versions of GIMP are affected by CVE-2026-66758?
All versions of GIMP that include the file-fits plugin are affected by CVE-2026-66758.