CVE-2025-68950

4.0 MEDIUM

📋 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

Products:
  • ImageMagick
Versions: All versions before 7.1.2-12
Operating Systems: All platforms running vulnerable ImageMagick versions
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability triggers when processing MVG files containing circular references. Any application using ImageMagick to process untrusted MVG files is affected.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: MEDIUM - Web applications accepting image uploads could be targeted, but requires specific MVG file processing.
🏢 Internal Only: LOW - Requires user interaction or automated processing of malicious MVG files.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

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

all

Remove MVG from ImageMagick's supported formats to prevent exploitation

Edit policy.xml: <policy domain="coder" rights="none" pattern="MVG" />

Input validation and filtering

all

Reject 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"))

🔗 References

📤 Share & Export