CVE-2025-68950
📋 TL;DR
ImageMagick versions before 7.1.2-12 contain a denial-of-service vulnerability where circular references between two MVG (Magick Vector Graphics) files cause a stack overflow. This affects any system that processes untrusted MVG files through ImageMagick, including web applications, document processing systems, and image conversion services.
💻 Affected Systems
- ImageMagick
📦 What is this software?
Imagemagick by Imagemagick
⚠️ Risk & Real-World Impact
Worst Case
Complete service disruption through denial-of-service, potentially crashing the ImageMagick process and any dependent applications.
Likely Case
Application crashes or hangs when processing malicious MVG files, leading to service interruptions.
If Mitigated
Minimal impact with proper input validation and file type restrictions in place.
🎯 Exploit Status
Exploitation requires the attacker to supply a malicious MVG file that gets processed by ImageMagick. No authentication needed if the application accepts file uploads.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 7.1.2-12
Vendor Advisory: https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-7rvh-xqp3-pr8j
Restart Required: Yes
Instructions:
1. Update ImageMagick to version 7.1.2-12 or later. 2. For Linux systems: Use package manager (apt-get upgrade imagemagick, yum update imagemagick, etc.). 3. For source installations: Download latest version from ImageMagick.org and recompile. 4. Restart any services using ImageMagick.
🔧 Temporary Workarounds
Disable MVG format processing
allRemove MVG from ImageMagick's supported formats to prevent exploitation
Edit policy.xml: <policy domain="coder" rights="none" pattern="MVG" />
Input validation and filtering
allReject or sanitize MVG files at application level before processing
🧯 If You Can't Patch
- Implement strict file type validation to reject MVG files at application entry points
- Run ImageMagick in isolated containers with resource limits to contain crashes
🔍 How to Verify
Check if Vulnerable:
Check ImageMagick version: convert --version | grep Version
Check Version:
convert --version | head -1
Verify Fix Applied:
Verify version is 7.1.2-12 or higher and test processing known safe MVG files
📡 Detection & Monitoring
Log Indicators:
- ImageMagick process crashes
- Stack overflow errors in application logs
- Failed image processing operations
Network Indicators:
- Multiple failed upload attempts with MVG files
- Unusual MVG file upload patterns
SIEM Query:
source="application.log" AND ("ImageMagick" AND ("crash" OR "stack overflow" OR "segmentation fault"))