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. 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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-66758
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 14:06 UTC · Revision 1
Source evidence
Gimp: integer overflow in file-fits plugin causes a heap-based buffer overflow on crafted fits images
core-osv · Original sourcePublished 27 Jul 2026, 19:07 UTC
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.
osv:CVE-2026-66758
Complete source record
{
"id": "bbf29d1ab4e9a2a54c1c2a4a8b89e338927e9b875a129957dde7d5f4337d6223",
"url": "https://osv.dev/vulnerability/CVE-2026-66758",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Gimp: integer overflow in file-fits plugin causes a heap-based buffer overflow on crafted fits images",
"summary": "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.",
"evidence": "osv:CVE-2026-66758",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-66758",
"aliases": [
"CVE-2026-66758"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/gnome/gimp",
"type": "GIT",
"events": [
{
"introduced": "6ac8031c9555667e080fef0324fca9f28a02e5ab"
},
{
"last_affected": "6987b3853c10517eb581deeb20572fb5f99a7086"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:gimp:gimp:3.0.8:*:*:*:*:*:*:*",
"range": [
{
"introduced": "3.0.8"
},
{
"last_affected": "3.0.8"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:gimp:gimp:3.2.4:*:*:*:*:*:*:*",
"range": [
{
"introduced": "3.2.4"
},
{
"last_affected": "3.2.4"
}
],
"source": "CPE_STRING"
}
]
}
}
],
"versions": [
"3.0.8",
"3.2.4"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-66758.json"
}
},
{
"ranges": [
{
"repo": "https://gitlab.gnome.org/gnome/gimp",
"type": "GIT",
"events": [
{
"introduced": "6ac8031c9555667e080fef0324fca9f28a02e5ab"
},
{
"last_affected": "6987b3853c10517eb581deeb20572fb5f99a7086"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:gimp:gimp:3.0.8:*:*:*:*:*:*:*",
"range": [
{
"introduced": "3.0.8"
},
{
"last_affected": "3.0.8"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:gimp:gimp:3.2.4:*:*:*:*:*:*:*",
"range": [
{
"introduced": "3.2.4"
},
{
"last_affected": "3.2.4"
}
],
"source": "CPE_STRING"
}
]
}
}
],
"versions": [
"3.0.8",
"3.2.4"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-66758.json"
}
}
],
"modified": "2026-10-28T02:30:50.946555658Z",
"provider": "osv",
"references": [
"https://access.redhat.com/downloads/content/package-browser/",
"https://access.redhat.com/errata/RHSA-2026:50817",
"https://access.redhat.com/errata/RHSA-2026:62507",
"https://access.redhat.com/errata/RHSA-2026:73768",
"https://access.redhat.com/errata/RHSA-2026:80509",
"https://access.redhat.com/security/cve/CVE-2026-66758",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/66xxx/CVE-2026-66758.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-66758",
"https://bugzilla.redhat.com/show_bug.cgi?id=2507475",
"https://gitlab.gnome.org/GNOME/gimp/-/issues/16528",
"https://gitlab.gnome.org/GNOME/gimp"
],
"provider_metadata": {
"cwe_ids": [
"CWE-190"
],
"cna_assigner": "redhat",
"unresolved_ranges": [
{
"extracted_events": [
{
"range": [
{
"fixed": "8100020260824165450.4c9c024f"
},
{
"fixed": "2:3.0.4-4.el9_8.9"
},
{
"fixed": "2:2.99.8-4.el9_4.19"
},
{
"fixed": "2:2.99.8-4.el9_6.20"
}
],
"source": "AFFECTED_FIELD",
"strategy": "InverseAffectedRanges"
}
]
}
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/66xxx/CVE-2026-66758.json"
}
},
"related_cves": [
{
"value": "CVE-2026-66758",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 519559,
"published_at": "2026-07-27T19:07:12.789+00:00"
}