Categories
Audio Sources - Full Text Articles

Experts warn of two flaws in popular open-source software ImageMagick

Listen to this article

hacking.png?fit=1200%2C750&ssl=1

Experts disclosed details of two security flaws in the open-source softwareĀ ImageMagickĀ that could potentially lead to information disclosure or trigger a DoS condition.

Researchers at Metabase Q discovered a couple of security vulnerabilities in the open-source image manipulation softwareĀ ImageMagickĀ that could potentially lead to information disclosure or trigger a Denial of Service (DoS) condition (CVE-2022-44268, CVE-2022-44267).

ImageMagickĀ is a free andĀ open-sourceĀ software suite for displaying, converting, and editing raster image and vector image files.Ā 

The CVE-2022-44267Ā vulnerability is a DoS issue that can be triggered when parsing a PNG image with a filename that is a single dash (ā€œ-ā€œ).

ā€œWhen ImageMagick parses a PNG file, for example in a resize operation when receiving an image, the convert process could be left waiting for stdin input leading to a Denial of Service since the process won’t be able to process other images.ā€ reads the advisory published by Metabase Q. ā€œA malicious actor could craft a PNG or use an existing one and add a textual chunk type (e.g., tEXt). These types have a keyword and a text string. If the keyword is the string ā€œprofileā€ (without quotes) then ImageMagick will interpret the text string as a filename and will load the content as a raw profile. If the specified filename is ā€œ-ā€œ (a single dash) ImageMagick will try to read the content from standard input potentially leaving the process waiting forever.ā€

The CVE-2022-44268Ā vulnerability is an information disclosure flaw that can be exploited to read arbitrary files from a server when parsing an image. When the software parses a PNG image (e.g., for resize), the resulting image could have embedded the content of an arbitrary remote file (if the ImageMagick binary has permissions to read it).

ā€œWhen ImageMagick parses the PNG file, for example in a resize operation, the resulting image could have embedded the content of an arbitrary remote file from the website (if magick binary has permissions to read it).ā€ continues the advisory. ā€œA malicious actor could craft a PNG or use an existing one and add a textual chunk type (e.g., tEXt). These types have a keyword and a text string. If the keyword is the string ā€œprofileā€ (without quotes) then ImageMagick will interpret the text string as a filename and will load the content as a raw profile, then the attacker can download the resized image which will come with the content of a remote file.ā€

In order to remotely exploit the issues, an attacker must upload a specially crafted image to a website using the ImageMagick software. The attacker can craft the image by inserting aĀ text chunkĀ that specifies some metadata such as the filename, which must be set to ā€œ-ā€ for exploitation.

The two vulnerabilities affect ImageMagick version 7.1.0-49 of the software, they wereĀ addressedĀ in with the release ofĀ version 7.1.0-52 on November 2022.

Vulnerabilities on open-source libraries like ImageMagick are very dangerous and can be exploited by attackers in the wild.

In Mat 2016, the security researcher John Graham-Cumming from CloudFlareĀ assertedĀ that his firm recently discovered a critical vulnerability, code-named CVE-2016-3714 (or ImageTragick), in the popular image manipulation software,Ā ImageMagick.

The flaw could be exploited by hackers to take overĀ websites running the widely used image-enhancing app. The vulnerability in ImageMagick App allows attackers to run arbitrary code on the targeted web servers that rely on the app for resizing or cropping user-uploaded images.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

PierluigiĀ Paganini

(SecurityAffairs – hacking, ImageMagick)

The post Experts warn of two flaws in popular open-source software ImageMagick appeared first on Security Affairs.