Secunia - Stay Secure
Gartner
Home Corporate Website Jobs Updated Mailing Lists RSS Blog  Online Shop Advertise
Software Inspectors
  Scan Online
  Personal (PSI)
  Network (NSI 2.0)

Solutions For
  Security Professionals
  Security Vendors

Free Solutions For
  Open Communities
  Journalists & Media

Secunia Advisories
  Search
  Historic Advisories
  Listed By Product
  Listed By Vendor
  Statistics / Graphs
  Secunia Research
  Report Vulnerability
  About Advisories

Virus Information
  Chronological List
  Last 10 Virus Alerts
  About Virus Information

Secunia Customers
  Customer Area


ImageMagick Utilities Image Filename Handling Two Vulnerabilities Advisory Available in Danish 

Secunia Advisory: SA18261  
Release Date: 2005-12-30
Last Update: 2006-05-26

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

Software:ImageMagick 6.x

CVE reference:CVE-2005-4601 (Secunia mirror)
CVE-2006-0082 (Secunia mirror)
CVE-2006-2440 (Secunia mirror)

This advisory is currently marked as unpatched!
- Companies can be alerted when a patch is released!


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



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.

12 Related Secunia Security Advisories, displaying 10

1. ImageMagick Multiple Vulnerabilities
2. ImageMagick DCM and XWD Buffer Overflows
3. ImageMagick PALM and DCM Buffer Overflows
4. ImageMagick XCF and Sun Rasterfile Buffer Overflows
5. ImageMagick "ReadSGIImage()" Integer Overflow Vulnerability
6. ImageMagick XWD Decoding Denial of Service Vulnerability
7. ImageMagick PNM Image Decoding Buffer Overflow Vulnerability
8. Imagemagick Filename Handling Format String Vulnerability
9. ImageMagick PSD Image Decoding Buffer Overflow
10. ImageMagick EXIF Parser Buffer Overflow Vulnerability

Show all related 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.








Secunia PSI
Scan | Patch | Track
Free Download

Secunia Poll

Do you think it's important to read Setup/User Guides for applications for use within your network?


See Results   


Most Popular Advisories

1.
BlackBerry Enterprise Server PDF Processing Vulnerability
2.
Sun Solaris System Management Agent SNMP Daemon Buffer Overflow
3.
Vim configure.in Insecure Temporary Files
4.
IBM WebSphere Application Server Unspecified Vulnerability
5.
tplSoccerSite Multiple SQL Injection Vulnerabilities
6.
MRO Maximo Information Disclosure and Cross-Site Scripting
7.
phpHoo3 "viewCat" SQL Injection Vulnerability
8.
Fedora update for firefox
9.
AlstraSoft Video Share Enterprise "UID" SQL Injection
10.
LunarNight Laboratory WebProxy Cross-Site Scripting





Vulnerability Management - Terms & Conditions - Copyright 2002-2008 Secunia - Compliance - Contact Secunia