CVE Database›Document archive›CVE-2026-23874

CVE-2026-23874

ImageMagick: ImageMagick: Denial of Service via infinite recursion in MSL command

Loading…

Severity

Moderate

Red Hat Product Security

5.5

CVSS 3.1

Review impact separately from score.

Published · January 20, 2026

Updated · October 15, 2026

Description

A flaw was found in ImageMagick. A local user could exploit this vulnerability by providing a specially crafted Magick Scripting Language (MSL) file. This file, when processed, could trigger infinite recursion within the <write> command, leading to a stack overflow. Successful exploitation results in a Denial of Service (DoS) condition, making the application unavailable.

Statement

This vulnerability is rated Moderate for Red Hat products. It affects ImageMagick, where a stack overflow can occur due to infinite recursion when processing a specially crafted Magick Scripting Language (MSL) file. Exploitation requires an attacker to provide a malicious MSL file to a user or service that processes image files using ImageMagick in affected versions of Red Hat Enterprise Linux and Community Projects.

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 this issue, restrict ImageMagick's ability to process Magick Scripting Language (MSL) files. This can be achieved by adding a policy entry to disable the MSL coder. Create or modify the ImageMagick policy file (e.g., /etc/ImageMagick-7/policy.xml or /etc/ImageMagick/policy.xml) to include the following line within the <policymap> tags:

<policy domain="coder" rights="none" pattern="MSL" />

After modifying the policy file, services or applications that use ImageMagick may need to be restarted for the changes to take effect. This may impact functionality that relies on processing MSL files.

CVSS / CWE

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

CWE-835 · Loop with Unreachable Exit Condition ('Infinite Loop')