CVE-2026-25987

5.3 MEDIUM

📋 TL;DR

ImageMagick contains a heap buffer over-read vulnerability in its MAP image decoder that could allow attackers to cause crashes or leak memory by processing specially crafted MAP files. This affects all systems running vulnerable versions of ImageMagick that process untrusted MAP images. The vulnerability is rated CVSS 5.3 (Medium severity).

💻 Affected Systems

Products:
  • ImageMagick
Versions: All versions prior to 7.1.2-15 and 6.9.13-40
Operating Systems: All operating systems running vulnerable ImageMagick versions
Default Config Vulnerable: ⚠️ Yes
Notes: Any application or service that uses ImageMagick to process MAP format images is vulnerable. This includes web applications, document processing systems, and image conversion services.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution through memory corruption leading to complete system compromise, though this is unlikely given the nature of a buffer over-read.

🟠

Likely Case

Application crashes (denial of service) or unintended memory disclosure revealing sensitive information from the application's memory space.

🟢

If Mitigated

Limited impact with proper input validation and sandboxing, potentially just failed image processing.

🌐 Internet-Facing: MEDIUM - Web applications that allow image uploads and use ImageMagick to process MAP files could be exploited by attackers.
🏢 Internal Only: LOW - Internal systems that don't process untrusted MAP files have minimal exposure.

🎯 Exploit Status

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

Exploitation requires the attacker to supply a malicious MAP file that gets processed by ImageMagick. No authentication is needed if the system processes untrusted files.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 7.1.2-15 and 6.9.13-40

Vendor Advisory: https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-42p5-62qq-mmh7

Restart Required: Yes

Instructions:

1. Update ImageMagick using your system's package manager (apt, yum, brew, etc.) 2. Restart any services or applications using ImageMagick 3. Verify the update with 'convert --version' or 'magick --version'

🔧 Temporary Workarounds

Disable MAP format support

all

Remove or disable MAP format decoder in ImageMagick policy.xml

Edit /etc/ImageMagick-7/policy.xml or /etc/ImageMagick-6/policy.xml
Add: <policy domain="coder" rights="none" pattern="MAP" />

Input validation and sanitization

all

Reject or convert MAP files before processing with ImageMagick

Implement file type validation in applications
Convert MAP to safe formats before ImageMagick processing

🧯 If You Can't Patch

  • Implement strict input validation to reject MAP files from untrusted sources
  • Run ImageMagick in a sandboxed environment with limited privileges and memory restrictions

🔍 How to Verify

Check if Vulnerable:

Check ImageMagick version with 'convert --version' or 'magick --version' and compare against vulnerable versions

Check Version:

convert --version 2>/dev/null || magick --version 2>/dev/null || echo "ImageMagick not found"

Verify Fix Applied:

Confirm version is 7.1.2-15 or higher (for ImageMagick 7) or 6.9.13-40 or higher (for ImageMagick 6)

📡 Detection & Monitoring

Log Indicators:

  • ImageMagick segmentation faults or crashes
  • Failed MAP file processing errors
  • Memory allocation failures in ImageMagick logs

Network Indicators:

  • Unusual MAP file uploads to web applications
  • Multiple failed image processing requests

SIEM Query:

source="*imagick*" AND ("segmentation fault" OR "MAP" OR "buffer over-read")

🔗 References

📤 Share & Export