Vulnerabilities > CVE-2005-1275 - Remote Buffer Overflow vulnerability in ImageMagick PNM Image Decoding
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
NONE Integrity impact
NONE Availability impact
PARTIAL Summary
Heap-based buffer overflow in the ReadPNMImage function in pnm.c for ImageMagick 6.2.1 and earlier allows remote attackers to cause a denial of service (application crash) via a PNM file with a small colors value.
Vulnerable Configurations
Exploit-Db
description | ImageMagick 6.x PNM Image Decoding Remote Buffer Overflow Vulnerability. CVE-2005-1275. Dos exploit for linux platform |
id | EDB-ID:25527 |
last seen | 2016-02-03 |
modified | 2005-04-25 |
published | 2005-04-25 |
reporter | Damian Put |
source | https://www.exploit-db.com/download/25527/ |
title | ImageMagick 6.x PNM Image Decoding Remote Buffer Overflow Vulnerability |
Nessus
NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_CD286CC5B76211D9BFB7000C6EC775D9.NASL description Damian Put reports about ImageMagick : Remote exploitation of a heap overflow vulnerability could allow execution of arbitrary code or course denial of service. A heap overflow exists in ReadPNMImage() function, that is used to decode a PNM image files. last seen 2020-06-01 modified 2020-06-02 plugin id 19125 published 2005-07-13 reporter This script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/19125 title FreeBSD : ImageMagick -- ReadPNMImage() heap overflow vulnerability (cd286cc5-b762-11d9-bfb7-000c6ec775d9) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from the FreeBSD VuXML database : # # Copyright 2003-2018 Jacques Vidrine and contributors # # Redistribution and use in source (VuXML) and 'compiled' forms (SGML, # HTML, PDF, PostScript, RTF and so forth) with or without modification, # are permitted provided that the following conditions are met: # 1. Redistributions of source code (VuXML) must retain the above # copyright notice, this list of conditions and the following # disclaimer as the first lines of this file unmodified. # 2. Redistributions in compiled form (transformed to other DTDs, # published online in any format, converted to PDF, PostScript, # RTF and other formats) must reproduce the above copyright # notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # include("compat.inc"); if (description) { script_id(19125); script_version("1.25"); script_cvs_date("Date: 2019/08/02 13:32:37"); script_cve_id("CVE-2005-1275"); script_bugtraq_id(13351); script_name(english:"FreeBSD : ImageMagick -- ReadPNMImage() heap overflow vulnerability (cd286cc5-b762-11d9-bfb7-000c6ec775d9)"); script_summary(english:"Checks for updated packages in pkg_info output"); script_set_attribute( attribute:"synopsis", value: "The remote FreeBSD host is missing one or more security-related updates." ); script_set_attribute( attribute:"description", value: "Damian Put reports about ImageMagick : Remote exploitation of a heap overflow vulnerability could allow execution of arbitrary code or course denial of service. A heap overflow exists in ReadPNMImage() function, that is used to decode a PNM image files." ); # http://marc.theaimsgroup.com/?l=bugtraq&m=111445767107869 script_set_attribute( attribute:"see_also", value:"https://marc.info/?l=bugtraq&m=111445767107869" ); # https://vuxml.freebsd.org/freebsd/cd286cc5-b762-11d9-bfb7-000c6ec775d9.html script_set_attribute( attribute:"see_also", value:"http://www.nessus.org/u?2612f0af" ); script_set_attribute(attribute:"solution", value:"Update the affected packages."); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P"); script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available"); script_set_attribute(attribute:"exploit_available", value:"true"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:ImageMagick"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:ImageMagick-nox11"); script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd"); script_set_attribute(attribute:"vuln_publication_date", value:"2005/04/25"); script_set_attribute(attribute:"patch_publication_date", value:"2005/04/27"); script_set_attribute(attribute:"plugin_publication_date", value:"2005/07/13"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"FreeBSD Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/FreeBSD/release", "Host/FreeBSD/pkg_info"); exit(0); } include("audit.inc"); include("freebsd_package.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/FreeBSD/release")) audit(AUDIT_OS_NOT, "FreeBSD"); if (!get_kb_item("Host/FreeBSD/pkg_info")) audit(AUDIT_PACKAGE_LIST_MISSING); flag = 0; if (pkg_test(save_report:TRUE, pkg:"ImageMagick<6.2.2")) flag++; if (pkg_test(save_report:TRUE, pkg:"ImageMagick-nox11<6.2.2")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:pkg_report_get()); else security_warning(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
NASL family Ubuntu Local Security Checks NASL id UBUNTU_USN-132-1.NASL description Damian Put discovered a buffer overflow in the PNM image decoder. Processing a specially crafted PNM file with a small last seen 2020-06-01 modified 2020-06-02 plugin id 20523 published 2006-01-15 reporter Ubuntu Security Notice (C) 2005-2019 Canonical, Inc. / NASL script (C) 2006-2016 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/20523 title Ubuntu 4.10 / 5.04 : imagemagick vulnerabilities (USN-132-1) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Ubuntu Security Notice USN-132-1. The text # itself is copyright (C) Canonical, Inc. See # <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered # trademark of Canonical, Inc. # include("compat.inc"); if (description) { script_id(20523); script_version("1.13"); script_cvs_date("Date: 2019/08/02 13:33:00"); script_cve_id("CVE-2005-1275"); script_xref(name:"USN", value:"132-1"); script_name(english:"Ubuntu 4.10 / 5.04 : imagemagick vulnerabilities (USN-132-1)"); script_summary(english:"Checks dpkg output for updated packages."); script_set_attribute( attribute:"synopsis", value: "The remote Ubuntu host is missing one or more security-related patches." ); script_set_attribute( attribute:"description", value: "Damian Put discovered a buffer overflow in the PNM image decoder. Processing a specially crafted PNM file with a small 'colors' value resulted in a crash of the application that used the ImageMagick library. (CAN-2005-1275) Another Denial of Service vulnerability was found in the XWD decoder. Specially crafted invalid color masks resulted in an infinite loop which caused the application using the ImageMagick library to stop working and use all available CPU resources. (http://bugs.gentoo.org/show_bug.cgi?id=90423) Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues." ); script_set_attribute(attribute:"solution", value:"Update the affected packages."); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:imagemagick"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:libmagick++6"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:libmagick++6-dev"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:libmagick6"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:libmagick6-dev"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:perlmagick"); script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:4.10"); script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:5.04"); script_set_attribute(attribute:"patch_publication_date", value:"2005/05/23"); script_set_attribute(attribute:"plugin_publication_date", value:"2006/01/15"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"Ubuntu Security Notice (C) 2005-2019 Canonical, Inc. / NASL script (C) 2006-2016 Tenable Network Security, Inc."); script_family(english:"Ubuntu Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l"); exit(0); } include("audit.inc"); include("ubuntu.inc"); include("misc_func.inc"); if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); release = get_kb_item("Host/Ubuntu/release"); if ( isnull(release) ) audit(AUDIT_OS_NOT, "Ubuntu"); release = chomp(release); if (! ereg(pattern:"^(4\.10|5\.04)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 4.10 / 5.04", "Ubuntu " + release); if ( ! get_kb_item("Host/Debian/dpkg-l") ) audit(AUDIT_PACKAGE_LIST_MISSING); cpu = get_kb_item("Host/cpu"); if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH); if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Ubuntu", cpu); flag = 0; if (ubuntu_check(osver:"4.10", pkgname:"imagemagick", pkgver:"6.0.2.5-1ubuntu1.5")) flag++; if (ubuntu_check(osver:"4.10", pkgname:"libmagick++6", pkgver:"6.0.2.5-1ubuntu1.5")) flag++; if (ubuntu_check(osver:"4.10", pkgname:"libmagick++6-dev", pkgver:"6.0.2.5-1ubuntu1.5")) flag++; if (ubuntu_check(osver:"4.10", pkgname:"libmagick6", pkgver:"6.0.2.5-1ubuntu1.5")) flag++; if (ubuntu_check(osver:"4.10", pkgname:"libmagick6-dev", pkgver:"6.0.2.5-1ubuntu1.5")) flag++; if (ubuntu_check(osver:"4.10", pkgname:"perlmagick", pkgver:"6.0.2.5-1ubuntu1.5")) flag++; if (ubuntu_check(osver:"5.04", pkgname:"imagemagick", pkgver:"6.0.6.2-2.1ubuntu1.1")) flag++; if (ubuntu_check(osver:"5.04", pkgname:"libmagick++6", pkgver:"6.0.6.2-2.1ubuntu1.1")) flag++; if (ubuntu_check(osver:"5.04", pkgname:"libmagick++6-dev", pkgver:"6.0.6.2-2.1ubuntu1.1")) flag++; if (ubuntu_check(osver:"5.04", pkgname:"libmagick6", pkgver:"6.0.6.2-2.1ubuntu1.1")) flag++; if (ubuntu_check(osver:"5.04", pkgname:"libmagick6-dev", pkgver:"6.0.6.2-2.1ubuntu1.1")) flag++; if (ubuntu_check(osver:"5.04", pkgname:"perlmagick", pkgver:"6.0.6.2-2.1ubuntu1.1")) flag++; if (flag) { security_report_v4( port : 0, severity : SECURITY_WARNING, extra : ubuntu_report_get() ); exit(0); } else { tested = ubuntu_pkg_tests_get(); if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested); else audit(AUDIT_PACKAGE_NOT_INSTALLED, "imagemagick / libmagick++6 / libmagick++6-dev / libmagick6 / etc"); }
NASL family Mandriva Local Security Checks NASL id MANDRAKE_MDKSA-2005-107.NASL description A heap-based buffer overflow was found in the way that ImageMagick parses PNM files. If an attacker can trick a victim into opening a specially crafted PNM file, the attacker could execute arbitrary code on the victim last seen 2020-06-01 modified 2020-06-02 plugin id 18584 published 2005-06-28 reporter This script is Copyright (C) 2005-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/18584 title Mandrake Linux Security Advisory : ImageMagick (MDKSA-2005:107) NASL family Red Hat Local Security Checks NASL id REDHAT-RHSA-2005-413.NASL description Updated ImageMagick packages that fix a buffer overflow issue are now available. This update has been rated as having important security impact by the Red Hat Security Response Team. ImageMagick(TM) is an image display and manipulation tool for the X Window System which can read and write multiple image formats. A heap based buffer overflow bug was found in the way ImageMagick parses PNM files. An attacker could execute arbitrary code on a victim last seen 2020-06-01 modified 2020-06-02 plugin id 18385 published 2005-05-28 reporter This script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/18385 title RHEL 3 / 4 : ImageMagick (RHSA-2005:413) NASL family CentOS Local Security Checks NASL id CENTOS_RHSA-2005-413.NASL description Updated ImageMagick packages that fix a buffer overflow issue are now available. This update has been rated as having important security impact by the Red Hat Security Response Team. ImageMagick(TM) is an image display and manipulation tool for the X Window System which can read and write multiple image formats. A heap based buffer overflow bug was found in the way ImageMagick parses PNM files. An attacker could execute arbitrary code on a victim last seen 2020-06-01 modified 2020-06-02 plugin id 21821 published 2006-07-03 reporter This script is Copyright (C) 2006-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/21821 title CentOS 3 / 4 : ImageMagick (CESA-2005:413)
Oval
accepted 2013-04-29T04:00:09.944-04:00 class vulnerability contributors name Aharon Chernin organization SCAP.com, LLC name Dragos Prisaca organization G2, Inc.
definition_extensions comment The operating system installed on the system is Red Hat Enterprise Linux 3 oval oval:org.mitre.oval:def:11782 comment CentOS Linux 3.x oval oval:org.mitre.oval:def:16651 comment The operating system installed on the system is Red Hat Enterprise Linux 4 oval oval:org.mitre.oval:def:11831 comment CentOS Linux 4.x oval oval:org.mitre.oval:def:16636 comment Oracle Linux 4.x oval oval:org.mitre.oval:def:15990
description Heap-based buffer overflow in the ReadPNMImage function in pnm.c for ImageMagick 6.2.1 and earlier allows remote attackers to cause a denial of service (application crash) via a PNM file with a small colors value. family unix id oval:org.mitre.oval:def:10003 status accepted submitted 2010-07-09T03:56:16-04:00 title Heap-based buffer overflow in the ReadPNMImage function in pnm.c for ImageMagick 6.2.1 and earlier allows remote attackers to cause a denial of service (application crash) via a PNM file with a small colors value. version 26 accepted 2005-08-18T07:37:00.000-04:00 class vulnerability contributors name Jay Beale organization Bastille Linux description Heap-based buffer overflow in the ReadPNMImage function in pnm.c for ImageMagick 6.2.1 and earlier allows remote attackers to cause a denial of service (application crash) via a PNM file with a small colors value. family unix id oval:org.mitre.oval:def:711 status accepted submitted 2005-06-28T12:00:00.000-04:00 title ImageMagick Buffer Overflow in ReadPNMImage() version 4
Redhat
advisories |
| ||||
rpms |
|
References
- http://bugs.gentoo.org/show_bug.cgi?id=90423
- http://seclists.org/lists/bugtraq/2005/Apr/0407.html
- http://www.imagemagick.org/script/changelog.php
- http://www.mandriva.com/security/advisories?name=MDKSA-2005:107
- http://www.overflow.pl/adv/imheapoverflow.txt
- http://www.redhat.com/support/errata/RHSA-2005-413.html
- http://www.securityfocus.com/bid/13351
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10003
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A711