CVE Database›Document archive›CVE-2022-44268

CVE-2022-44268

ImageMagick: vulnerable to Information Disclosure when it parses a PNG image

Loading…

Severity

Moderate

Red Hat Product Security

6.5

CVSS 3.1

Review impact separately from score.

Published · February 6, 2023

Updated · November 21, 2025

Description

An information disclosure vulnerability was found in ImageMagick. This flaw allows an attacker to read arbitrary files from a server when parsing an image and happens when the program is parsing a PNG image. If ImageMagick has permission to read other arbitrary files, the resulting image could have been embedded with contents from another file on the machine after the parsing process.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

To mitigate the issue, we recommend setting a security policy that is suitable for your local environment. Add this to your security policy (policy.xml):

<policy domain="path" rights="none" pattern="/etc/*"/>  <!-- don't read sensitive paths -->

With above policy, you get:

$ magick logo: -set profile /etc/passwd logo.png
magick: attempt to perform an operation not allowed by the security policy `/etc/passwd' @ error/blob.c/FileToBlob/1433.

This can be as draconian as needed. Use /* as the path to prevent reading any file with an absolute path. You can also protect against relative paths:

<policy domain="path" rights="none" pattern="../*"/>

(For more information, refer to the complete issue discussion in external references)

CVSS / CWE

CVSS 3.1 · 6.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

CWE-200 · Exposure of Sensitive Information to an Unauthorized Actor