CVE-2026-25798

5.3 MEDIUM

📋 TL;DR

A NULL pointer dereference vulnerability in ImageMagick's ClonePixelCacheRepository function allows remote attackers to crash applications by providing a specially crafted image file, causing denial of service. This affects any application using vulnerable ImageMagick versions to process untrusted images. The vulnerability is triggered during image processing operations.

💻 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 linked against vulnerable ImageMagick libraries is affected when processing image files.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete application crash leading to denial of service for all users, potentially disrupting critical image processing workflows or web services that rely on ImageMagick.

🟠

Likely Case

Application crashes when processing malicious images, causing temporary service disruption until the application restarts.

🟢

If Mitigated

Minimal impact with proper input validation and sandboxing; crashes are contained to individual processes without affecting the entire system.

🌐 Internet-Facing: MEDIUM - Web applications accepting image uploads from untrusted sources are vulnerable, but impact is limited to DoS rather than data compromise.
🏢 Internal Only: LOW - Internal systems processing trusted images have minimal exposure; risk increases if processing user-uploaded content.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW - Requires only a crafted image file to trigger the crash.

Exploitation is straightforward: attackers can create malicious images that trigger the NULL pointer dereference when processed.

🛠️ 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-p863-5fgm-rgq4

Restart Required: Yes

Instructions:

1. Update ImageMagick to version 7.1.2-15 or 6.9.13-40 using your package manager. 2. Restart all applications using ImageMagick. 3. Rebuild any applications statically linked with ImageMagick.

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement strict validation of image files before processing with ImageMagick.

Process isolation

linux

Run ImageMagick in isolated containers or sandboxes to limit crash impact.

docker run --security-opt=no-new-privileges imagemagick-container

🧯 If You Can't Patch

  • Implement strict file type validation and reject suspicious image formats
  • Deploy ImageMagick in containerized environments with automatic restart policies

🔍 How to Verify

Check if Vulnerable:

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

Check Version:

convert --version | head -1

Verify Fix Applied:

Verify version is 7.1.2-15 or higher (for version 7) or 6.9.13-40 or higher (for version 6).

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with segmentation fault errors
  • ImageMagick process termination logs
  • Increased restart frequency of services using ImageMagick

Network Indicators:

  • Unusual image upload patterns
  • Multiple failed image processing requests

SIEM Query:

source="application.logs" AND ("segmentation fault" OR "ImageMagick" AND "crash")

🔗 References

📤 Share & Export