CVE-2025-62594

4.7 MEDIUM

📋 TL;DR

ImageMagick versions before 7.1.2-8 contain a vulnerability in the CLAHEImage function where zero tile dimensions cause unsigned integer underflow and division-by-zero errors. This leads to out-of-bounds memory access and immediate crashes, resulting in denial-of-service. Any system using vulnerable ImageMagick versions to process untrusted images is affected.

💻 Affected Systems

Products:
  • ImageMagick
Versions: All versions prior to 7.1.2-8
Operating Systems: All platforms running ImageMagick
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using ImageMagick to process images is vulnerable if using affected versions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption through repeated crashes when processing malicious images, potentially affecting availability of image processing services.

🟠

Likely Case

Intermittent crashes when processing specially crafted images, causing service interruptions and requiring restarts.

🟢

If Mitigated

Minimal impact with proper input validation and sandboxing of image processing operations.

🌐 Internet-Facing: MEDIUM - Internet-facing services accepting image uploads could be targeted for DoS attacks.
🏢 Internal Only: LOW - Internal systems processing trusted images have lower exposure risk.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires crafting malicious images with zero tile dimensions to trigger the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 7.1.2-8

Vendor Advisory: https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-wpp4-vqfq-v4hp

Restart Required: No

Instructions:

1. Update ImageMagick to version 7.1.2-8 or later. 2. For package managers: 'sudo apt update && sudo apt upgrade imagemagick' (Debian/Ubuntu) or 'sudo yum update imagemagick' (RHEL/CentOS). 3. For source builds: Download latest from https://imagemagick.org and recompile.

🔧 Temporary Workarounds

Input Validation

all

Implement server-side validation to reject images with suspicious dimensions before processing with ImageMagick.

🧯 If You Can't Patch

  • Implement strict input validation to filter out images with zero dimensions before ImageMagick processing.
  • Sandbox ImageMagick processes with resource limits and isolation to contain crashes.

🔍 How to Verify

Check if Vulnerable:

Run 'convert --version' or 'magick --version' and check if version is below 7.1.2-8.

Check Version:

convert --version | head -1

Verify Fix Applied:

After update, verify version is 7.1.2-8 or higher using 'convert --version'.

📡 Detection & Monitoring

Log Indicators:

  • ImageMagick process crashes
  • Segmentation fault errors in application logs
  • Failed image processing operations

Network Indicators:

  • Unusual volume of image uploads to vulnerable endpoints

SIEM Query:

source="*imagemagick*" AND ("segmentation fault" OR "crash" OR "SIGSEGV")

🔗 References

📤 Share & Export