GLSA-202405-02 : ImageMagick: Multiple Vulnerabilities

high Nessus Plugin ID 194973

Description

The remote host is affected by the vulnerability described in GLSA-202405-02 (ImageMagick: Multiple Vulnerabilities)

- A flaw was found in ImageMagick. The vulnerability occurs due to improper use of open functions and leads to a denial of service. This flaw allows an attacker to crash the system. (CVE-2021-4219)

- An integer overflow issue was discovered in ImageMagick's ExportIndexQuantum() function in MagickCore/quantum-export.c. Function calls to GetPixelIndex() could result in values outside the range of representable for the 'unsigned char'. When ImageMagick processes a crafted pdf file, this could lead to an undefined behaviour or a crash. (CVE-2021-20224)

- A heap-based-buffer-over-read flaw was found in ImageMagick's GetPixelAlpha() function of 'pixel- accessor.h'. This vulnerability is triggered when an attacker passes a specially crafted Tagged Image File Format (TIFF) image to convert it into a PICON file format. This issue can potentially lead to a denial of service and information disclosure. (CVE-2022-0284)

- A heap-buffer-overflow flaw was found in ImageMagick's PushShortPixel() function of quantum-private.h file. This vulnerability is triggered when an attacker passes a specially crafted TIFF image file to ImageMagick for conversion, potentially leading to a denial of service. (CVE-2022-1115)

- In ImageMagick, a crafted file could trigger an assertion failure when a call to WriteImages was made in MagickWand/operation.c, due to a NULL image list. This could potentially cause a denial of service. This was fixed in upstream ImageMagick version 7.1.0-30. (CVE-2022-2719)

- A heap buffer overflow issue was found in ImageMagick. When an application processes a malformed TIFF file, it could lead to undefined behavior or a crash causing a denial of service. (CVE-2022-3213)

- ImageMagick 7.1.0-27 is vulnerable to Buffer Overflow. (CVE-2022-28463)

- A vulnerability was found in ImageMagick, causing an outside the range of representable values of type 'unsigned char' at coders/psd.c, when crafted or untrusted input is processed. This leads to a negative impact to application availability or other problems related to undefined behavior. (CVE-2022-32545)

- A vulnerability was found in ImageMagick, causing an outside the range of representable values of type 'unsigned long' at coders/pcl.c, when crafted or untrusted input is processed. This leads to a negative impact to application availability or other problems related to undefined behavior. (CVE-2022-32546)

- In ImageMagick, there is load of misaligned address for type 'double', which requires 8 byte alignment and for type 'float', which requires 4 byte alignment at MagickCore/property.c. Whenever crafted or untrusted input is processed by ImageMagick, this causes a negative impact to application availability or other problems related to undefined behavior. (CVE-2022-32547)

- ImageMagick 7.1.0-49 is vulnerable to Denial of Service. When it parses a PNG image (e.g., for resize), the convert process could be left waiting for stdin input. (CVE-2022-44267)

- ImageMagick 7.1.0-49 is vulnerable to Information Disclosure. When it parses a PNG image (e.g., for resize), the resulting image could have embedded the content of an arbitrary. file (if the magick binary has permissions to read it). (CVE-2022-44268)

- A heap-based buffer overflow issue was discovered in ImageMagick's ImportMultiSpectralQuantum() function in MagickCore/quantum-import.c. An attacker could pass specially crafted file to convert, triggering an out-of-bounds read error, allowing an application to crash, resulting in a denial of service.
(CVE-2023-1906)

- A heap-based buffer overflow vulnerability was found in the ImageMagick package that can lead to the application crashing. (CVE-2023-2157)

- A heap use-after-free flaw was found in coders/bmp.c in ImageMagick. (CVE-2023-5341)

- A vulnerability was found in ImageMagick. This security flaw ouccers as an undefined behaviors of casting double to size_t in svg, mvg and other coders (recurring bugs of CVE-2022-32546). (CVE-2023-34151)

- A vulnerability was found in ImageMagick. This security flaw causes a shell command injection vulnerability via video:vsync or video:pixel-format options in VIDEO encoding/decoding. (CVE-2023-34153)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

All ImageMagick 6.x users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=media-gfx/imagemagick-6.9.13.0 =media-gfx/imagemagick-6* All ImageMagick 7.x users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=media-gfx/imagemagick-7.1.1.22

See Also

https://security.gentoo.org/glsa/202405-02

https://bugs.gentoo.org/show_bug.cgi?id=835931

https://bugs.gentoo.org/show_bug.cgi?id=843833

https://bugs.gentoo.org/show_bug.cgi?id=852947

https://bugs.gentoo.org/show_bug.cgi?id=871954

https://bugs.gentoo.org/show_bug.cgi?id=893526

https://bugs.gentoo.org/show_bug.cgi?id=904357

https://bugs.gentoo.org/show_bug.cgi?id=908082

https://bugs.gentoo.org/show_bug.cgi?id=917594

Plugin Details

Severity: High

ID: 194973

File Name: gentoo_GLSA-202405-02.nasl

Version: 1.2

Type: local

Published: 5/4/2024

Updated: 8/2/2024

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Temporal Score: 5.3

Vector: CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2022-32547

CVSS v3

Risk Factor: High

Base Score: 7.8

Temporal Score: 7

Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

CVSS Score Source: CVE-2023-34153

Vulnerability Information

CPE: cpe:/o:gentoo:linux, p-cpe:/a:gentoo:linux:imagemagick

Required KB Items: Host/local_checks_enabled, Host/Gentoo/release, Host/Gentoo/qpkg-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 5/4/2024

Vulnerability Publication Date: 2/24/2022

Reference Information

CVE: CVE-2021-20224, CVE-2021-4219, CVE-2022-0284, CVE-2022-1115, CVE-2022-2719, CVE-2022-28463, CVE-2022-3213, CVE-2022-32545, CVE-2022-32546, CVE-2022-32547, CVE-2022-44267, CVE-2022-44268, CVE-2023-1906, CVE-2023-2157, CVE-2023-34151, CVE-2023-34153, CVE-2023-5341

IAVB: 2024-B-0077-S