CVE-2026-25638: ImageMagick has memory leak in msl encoder
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.
Security readout for executives and security teams
Plain-English summary
ImageMagick can leak memory when handling MSL output because an error path returns before freeing allocated resources. The business risk is service degradation or denial of service in systems that process attacker-controlled images or image conversion requests. The cited advisory says patched versions are available.
Executive priority
Treat this as a moderate availability risk. Patch exposed image-processing workloads on a normal vulnerability-management timeline, faster for public upload or conversion services. There is no cited evidence of active exploitation in the provided material.
Technical view
CVE-2026-25638 is a CWE-401 memory leak in ImageMagick coders/msl.c, specifically WriteMSLImage. Affected versions are ImageMagick 7.0.0 through before 7.1.2-15 and 6.x before 6.9.13-40. CVSS 3.1 is 5.3, with low availability impact only.
Likely exposure
Exposure is most likely where ImageMagick processes untrusted or externally supplied image content, especially automated upload, conversion, thumbnailing, or document-processing services. Systems not using the MSL encoder path may have lower practical exposure, but the source bundle does not define exact trigger conditions.
Exploitation context
The source bundle does not report active exploitation, and KEV is false. The CVSS vector indicates network-reachable, low-complexity, unauthenticated, no-user-interaction conditions, but only low availability impact is claimed. No confidentiality or integrity impact is identified in the provided sources.
Researcher notes
The key evidence is the GitHub advisory description: allocated resources in WriteMSLImage can be leaked on early return. The bundle does not provide proof-of-concept details, exact input requirements, or workaround guidance beyond fixed versions, so validation should focus on version and exposure mapping.
Mitigation direction
Upgrade ImageMagick 7.x to 7.1.2-15 or later.
Upgrade ImageMagick 6.x to 6.9.13-40 or later.
Check the ImageMagick advisory for any vendor-supported operational mitigations.
Prioritize exposed image-processing services that accept untrusted uploads or remote conversion requests.
Validation and detection
Inventory ImageMagick versions across servers, containers, build images, and bundled application dependencies.
Confirm deployed 7.x versions are 7.1.2-15 or later.
Confirm deployed 6.x versions are 6.9.13-40 or later.
Identify applications that invoke ImageMagick for user-supplied image or document processing.
Review dependency locks and container layers for older ImageMagick packages.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-401: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-401 · source CWE mapping
Missing Release of Memory after Effective Lifetime
Missing Release of Memory after Effective Lifetime represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.