CVE-2026-25638

ImageMagick has memory leak in msl encoder

Published Feb 24, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 7.1.2-15 and 6.9.13-40, memory leak exists in `coders/msl.c`. In the `WriteMSLImage` function of the `msl.c` file, resources are allocated. But the function returns early without releasing these allocated resources. Versions 7.1.2-15 and 6.9.13-40 contain a patch.

Analysis

AI-generated

Technical impact

ImageMagick contains a memory leak in the WriteMSLImage function of msl.c that fails to release resources allocated during encoding. The leak is triggered when processing MSL images, potentially leading to memory exhaustion and application crashes. This weakness is classified as CWE‑401 and CWE‑772 and could be leveraged by an attacker to degrade performance or bring the system to a failure state, compromising availability.

Affected Systems

All versions of ImageMagick older than 7.1.2-15 and 6.9.13-40 are susceptible. The affected product is the ImageMagick image processing library and supporting tools. The patch was introduced in those specific releases.

Risk and Exploitability

With a CVSS score of 5.3 the risk level is moderate, but the exploitation probability is very low as shown by an EPSS score of less than 1 % and the absence from the KEV catalogue. The vulnerability is likely exploitable only by a local user or privileged process that can feed crafted MSL images into the library; remote exploitation has not been documented. In environments where untrusted images are processed, the risk is elevated.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade ImageMagick to version 7.1.2-15 or 6.9.13-40 to apply the critical memory‑leak fix.
  • Configure ImageMagick policy to disable or reject MSL images from untrusted sources, or compile the library without the msl decoder when possible.
  • Monitor memory consumption of ImageMagick processes and trigger alerts when usage increases unexpectedly, enabling rapid incident response.

Generated by OpenCVE AI on April 17, 2026 at 16:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4497-1 imagemagick security update
Debian DSA Debian DSA DSA-6158-1 imagemagick security update
Debian DSA Debian DSA DSA-6159-1 imagemagick security update
Github GHSA Github GHSA GHSA-gxcx-qjqp-8vjw ImageMagick has memory leak in msl encoder
Ubuntu USN Ubuntu USN USN-8263-1 ImageMagick vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
CPEs cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Imagemagick
Imagemagick imagemagick
Vendors & Products Imagemagick
Imagemagick imagemagick
Type Values Removed Values Added
Description ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 7.1.2-15 and 6.9.13-40, memory leak exists in `coders/msl.c`. In the `WriteMSLImage` function of the `msl.c` file, resources are allocated. But the function returns early without releasing these allocated resources. Versions 7.1.2-15 and 6.9.13-40 contain a patch.
Title ImageMagick has memory leak in msl encoder
Weaknesses CWE-401
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Weaknesses
  • CWE-401

    Missing Release of Memory after Effective Lifetime

  • CWE-772

    Missing Release of Resource after Effective Lifetime

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 23, 2026, 3:47 PM
Reserved
Feb 4, 2026, 5:15 AM
Status
Analyzed
Published
Feb 24, 2026, 1:16 AM
Modified
Jun 17, 2026, 10:24 AM
Severity
Moderate
Public date
Feb 24, 2026, 12:49 AM