CVE-2014-9841

9.8 CRITICAL

📋 TL;DR

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

💻 Affected Systems

Products:
  • ImageMagick
Versions: 6.8.9.9 and earlier versions
Operating Systems: Linux, Unix-like systems, Windows
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using ImageMagick to process PSD files is vulnerable. Common in web applications with image processing features.

📦 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 when processing malicious PSD files.

🟢

If Mitigated

Limited impact if proper input validation and sandboxing are implemented.

🌐 Internet-Facing: HIGH - Web applications accepting image uploads are directly exposed to exploitation.
🏢 Internal Only: MEDIUM - Internal systems processing untrusted PSD files remain vulnerable.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires only a malicious PSD file. No authentication needed if application accepts file uploads.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.8.9.10 and later

Vendor Advisory: http://www.openwall.com/lists/oss-security/2016/06/02/13

Restart Required: No

Instructions:

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

🔧 Temporary Workarounds

Disable PSD format support

linux

Remove PSD format from ImageMagick's policy.xml to prevent processing of PSD files

sed -i '/pattern="PSD"/d' /etc/ImageMagick/policy.xml
echo '<policy domain="delegate" rights="none" pattern="PSD" />' >> /etc/ImageMagick/policy.xml

Implement file type validation

all

Reject PSD files at application level before passing to ImageMagick

🧯 If You Can't Patch

  • Implement strict file upload validation to reject PSD files entirely
  • 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]\|6.8.9-[2-9]\|6.8.[1-9][0-9]\|6.9\|7.' && echo 'Patched'

📡 Detection & Monitoring

Log Indicators:

  • ImageMagick process crashes
  • Failed PSD file processing errors
  • Unusual memory usage patterns

Network Indicators:

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

SIEM Query:

process:convert AND (event_type:crash OR error_message:"PSD" OR memory_usage:>threshold)

🔗 References

📤 Share & Export