Secunia Logo
Netsikker nu! 2008
 
ImageMagick Utilities Image Filename Handling Two Vulnerabilities
Secunia Advisory: SA18261
Release Date: 2005-12-30
Last Update: 2006-05-26
Popularity: 10,135 views

Critical:
Moderately critical
Impact: System access
Where: From remote
Solution Status: Unpatched

Software:ImageMagick 6.x

Subscribe: Instant alerts on relevant vulnerabilities

CVE reference:CVE-2005-4601
CVE-2006-0082
CVE-2006-2440


Description:
Two vulnerabilities have been discovered in ImageMagick, which potentially can be exploited by malicious people to compromise a user's system.

1) An error exists in the delegate code used by various ImageMagick utilities (e.g. display, identify) when handling an image filename. This can be exploited to execute arbitrary commands when an image file with a filename containing shell command is opened either via the command line or from the file open dialog box.

Successful exploitation requires that the user is e.g. tricked into downloading and saving an image file with a specially crafted filename and opening it.

2) A format string error exists when handling filenames received via command line arguments. This can be exploited by passing a specially crafted output filename containing format specifiers (e.g. file%d%n%n.gif) to the "convert" utility.

The vulnerabilities have been confirmed in version 6.2.5 compiled from source (with default options). Other versions may also be affected.

Note: It has also been reported that an error in the display command, when handling command line arguments containing wildcards, can cause a heap-based buffer overflow when the wildcards are expanded to several files.

Solution:
Do not open image files with suspicious looking filenames.

If the affected binaries are accessible from a web application, then user supplied filenames should be sanitised before being passing as command line arguments to the affected binaries.

Provided and/or discovered by:
1) Florian Weimer
2) Daniel Kobras

Changelog:
2006-01-04: Added information about additional vulnerability.
2006-01-17: Added CVE reference.
2006-01-25: Added CVE reference. Updated "Description" section.
2006-05-26: Added CVE reference.

Original Advisory:
Debian:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345238
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345876
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345595


Track this Secunia Advisory
Customers of the Secunia Vulnerability Intelligence solutions will automatically receive updates when new information regarding this advisory is released.

Read more about our Vulnerability Intelligence solutions and what they can do for you and your company.

About this Secunia Advisory
Please note: The information that this Secunia Advisory is based on comes from a third party unless stated otherwise.

Secunia collects, validates, and verifies all vulnerability reports issued by security research groups, vendors, and others.
  
Latest Advisories

Send Feedback to Secunia
If you have new information regarding this Secunia advisory or a product in our database, please send it to us using either our web form or email us at vuln@secunia.com.

Ideas, suggestions, and other feedback are most welcome.

Most Popular - 3 Hours

1. phpBB Avatar Script Insertion Vulnerability // 65 views
2. phpBB Multiple Vulnerabilities // 50 views
3. Microsoft Windows Vista Page Fault Handling Denial of Service // 47 views
4. VMware ESX Server Sun Java JDK / JRE Multiple Vulnerabilities // 45 views
5. VMware VirtualCenter Multiple Vulnerabilities // 39 views
6. VMware ESX / ESXi "JMP" Privilege Escalation Vulnerability // 38 views
7. phpBB Avatar Functions Information Disclosure and Deletion // 35 views
8. Subdreamer Light Global Variables SQL Injection Vulnerability // 33 views
9. Nucleus EUC-JP Cross-Site Scripting Vulnerability // 33 views
10. JMweb MP3 Script "src" File Inclusion Vulnerabilities // 31 views