CVE-2014-9843

9.8 CRITICAL

📋 TL;DR

This vulnerability in ImageMagick's PSD file decoder allows remote attackers to execute arbitrary code or cause denial of service via specially crafted PSD files. It affects systems running vulnerable versions of ImageMagick that process untrusted PSD files, particularly web applications that use ImageMagick for image processing.

💻 Affected Systems

Products:
  • ImageMagick
Versions: 6.8.9.9 and earlier versions (specifically vulnerable in 6.8.9.9)
Operating Systems: Linux, Unix-like systems, Windows (if compiled from source)
Default Config Vulnerable: ⚠️ Yes
Notes: Any system using ImageMagick to process PSD files is vulnerable. Common in web applications using libraries like Paperclip, CarrierWave, or GraphicsMagick.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the ImageMagick process, potentially leading to complete system compromise.

🟠

Likely Case

Denial of service through application crashes or memory corruption, potentially leading to information disclosure.

🟢

If Mitigated

Limited impact if proper input validation and sandboxing are implemented, with only denial of service possible.

🌐 Internet-Facing: HIGH - Web applications processing user-uploaded images are directly exposed.
🏢 Internal Only: MEDIUM - Internal systems processing PSD files could be compromised via malicious files.

🎯 Exploit Status

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

Exploitation requires only a malicious PSD file, making it straightforward for attackers to craft payloads.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.8.9.10 and later

Vendor Advisory: http://www.ubuntu.com/usn/USN-3131-1

Restart Required: No

Instructions:

1. Update ImageMagick to version 6.8.9.10 or later. 2. For Linux systems: Use package manager (apt-get update && apt-get upgrade imagemagick). 3. For source compilation: Download latest version from ImageMagick.org and recompile.

🔧 Temporary Workarounds

Disable PSD format processing

linux

Remove PSD format support from ImageMagick policy configuration

Edit /etc/ImageMagick/policy.xml and add: <policy domain="coder" rights="none" pattern="PSD" />

Input validation for uploaded files

all

Reject PSD files at application level before ImageMagick processing

🧯 If You Can't Patch

  • Implement strict file type validation to block all PSD files from being processed
  • Run ImageMagick in a sandboxed/containerized environment with minimal privileges

🔍 How to Verify

Check if Vulnerable:

Check ImageMagick version: convert --version | head -1

Check Version:

convert --version | head -1

Verify Fix Applied:

Verify version is 6.8.9.10 or higher: convert --version | grep -q '6.8.9-1[0-9]' && echo 'Patched'

📡 Detection & Monitoring

Log Indicators:

  • ImageMagick process crashes
  • Segmentation faults in application logs
  • Unusual memory usage patterns

Network Indicators:

  • Uploads of PSD files to web applications
  • Unusual outbound connections from ImageMagick processes

SIEM Query:

process_name:"convert" AND (event_type:crash OR memory_usage:spike)

🔗 References

📤 Share & Export