Security Vulnerability Report
中文
CVE-2026-34238 CVSS 5.1 MEDIUM

CVE-2026-34238

Published: 2026-04-13 22:16:29
Last Modified: 2026-04-17 21:22:41

Description

ImageMagick is free and open-source software used for editing and manipulating digital images. In versions below both 7.1.2-19 and 6.9.13-44, an integer overflow in the despeckle operation causes a heap buffer overflow on 32-bit builds that will result in an out of bounds write. This issue has been fixed in versions 6.9.13-44 and 7.1.2-19.

CVSS Details

CVSS Score
5.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:* - VULNERABLE
ImageMagick < 7.1.2-19
ImageMagick < 6.9.13-44

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Proof of Concept for CVE-2026-34238 # This script demonstrates triggering the vulnerability by processing a crafted image. # Note: A specific malicious file is required to trigger the heap overflow. import subprocess import os def trigger_vulnerability(image_path): try: # Invoke ImageMagick convert command with despeckle operation # This operation triggers the integer overflow on vulnerable 32-bit builds print(f"[*] Processing image: {image_path}") result = subprocess.run( ['convert', image_path, '-despeckle', 'output.png'], capture_output=True, text=True, timeout=5 ) if result.returncode != 0: print(f"[!] Process crashed with return code: {result.returncode}") print(f"[!] Error: {result.stderr}") else: print("[-] Image processed without crashing (patched or invalid payload)") except subprocess.TimeoutExpired: print("[!] Process timed out. Potential Denial of Service triggered.") except Exception as e: print(f"[!] An error occurred: {e}") if __name__ == "__main__": # Placeholder for the crafted malicious image file malicious_file = "exploit_cve_2026_34238.mvg" if os.path.exists(malicious_file): trigger_vulnerability(malicious_file) else: print(f"[!] File '{malicious_file}' not found. Please provide a valid PoC file.") print("[*] Creating a dummy MVG file for testing structure (not an exploit)...") with open(malicious_file, "w") as f: # This is just a structure placeholder, not the actual exploit payload f.write("push graphic-context\nviewbox 0 0 640 480\npop graphic-context") print(f"[*] Dummy file created. Re-run with actual exploit payload.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34238", "sourceIdentifier": "[email protected]", "published": "2026-04-13T22:16:29.310", "lastModified": "2026-04-17T21:22:41.077", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "ImageMagick is free and open-source software used for editing and manipulating digital images. In versions below both 7.1.2-19 and 6.9.13-44, an integer overflow in the despeckle operation causes a heap buffer overflow on 32-bit builds that will result in an out of bounds write. This issue has been fixed in versions 6.9.13-44 and 7.1.2-19."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.1, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.4, "impactScore": 3.6}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-190"}, {"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.9.13-44", "matchCriteriaId": "FEBAB6BF-AFEC-4D29-95E8-88C4585C9896"}, {"vulnerable": true, "criteria": "cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*", "versionStartIncluding": "7.0.0-0", "versionEndExcluding": "7.1.2-19", "matchCriteriaId": "80D20334-B25F-479D-A411-DBD1364D303C"}]}]}], "references": [{"url": "https://github.com/ImageMagick/ImageMagick/commit/bcd8519c70ecd9ebbc180920f2cf97b267d1f440", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/ImageMagick/ImageMagick/releases/tag/7.1.2-19", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-26qp-ffjh-2x4v", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://github.com/dlemstra/Magick.NET/releases/tag/14.12.0", "source": "[email protected]", "tags": ["Release Notes"]}]}}