MEDIUM 6.2

CVE-2026-46523: ImageMagick Heap-Use-After-Free in MSL Processing

ImageMagick, widely used image processing software, contains a memory safety defect that can be triggered when processing specially crafted MSL (Magick Scripting Language) image files. The vulnerability allows an attacker with local file access to cause the application to crash or potentially execute code by manipulating freed memory. This affects both the maintained 7.x branch and the legacy 6.x branch before specific patch versions.

Source data · NVD / CISA · public domain

CVSS
3.1 · 6.2 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-416, CWE-825
Affected products
1 configuration(s)
Published / Modified
2026-06-10 / 2026-07-15

NVD description (verbatim)

ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 7.1.2.23 and 6.9.13-48, a crafted MSL image can trigger a heap-use-after-free. Versions 7.1.2.23 and 6.9.13-48 fix the issue.

5 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-46523 is a heap-use-after-free vulnerability (CWE-416, CWE-825) in ImageMagick's image processing pipeline. A malicious or corrupted MSL image file can cause the image parser to reference memory that has already been freed, leading to undefined behavior. The vulnerability requires local file system access and no user privileges, making it exploitable in automated image processing workflows or scenarios where untrusted images are processed server-side. The fix addresses the root cause in memory management during MSL parsing, implemented in versions 7.1.2.23 and 6.9.13-48.

Business impact

Organizations running ImageMagick for batch image processing, web applications accepting user-uploaded images, or automated media pipelines face denial-of-service risk. A crashed image processing service can disrupt document conversions, thumbnail generation, or media workflows. In multi-tenant or cloud environments where one customer's malicious image could crash shared processing infrastructure, blast radius expands. The MEDIUM severity reflects availability impact rather than confidentiality or integrity compromise, but operational availability is mission-critical for many imaging-dependent services.

Affected systems

ImageMagick versions prior to 7.1.2.23 (current branch) and prior to 6.9.13-48 (legacy branch) are vulnerable. This includes any system that processes MSL image files without the patched versions—common in web servers, content management systems, document processors, and containerized microservices. Organizations should audit deployment inventories, including versions bundled in third-party applications or Docker images.

Exploitability

Exploitation requires local file system access to place or inject a crafted MSL image into a processing queue. The vulnerability does not require special user privileges or interaction—a service account running ImageMagick will trigger the defect if it processes the malicious file. Remote exploitation is possible only in scenarios where an application accepts file uploads and processes them with vulnerable ImageMagick versions. No known public exploit code or weaponization has been reported at this publication date, and the vulnerability is not on the CISA Known Exploited Vulnerabilities (KEV) catalog.

Remediation

Upgrade ImageMagick to version 7.1.2.23 or later for the current branch, or to version 6.9.13-48 or later for the legacy branch. Verify the upgrade by checking the version string post-installation. For organizations unable to patch immediately, implement input validation to reject or sandbox MSL image files, and consider disabling MSL processing if not required by business logic. Apply patches across all instances, including those in containerized environments or third-party bundled distributions.

Patch guidance

Apply security updates from the official ImageMagick project sources. If you operate version 7.x, upgrade to 7.1.2.23 or a later release in that series; if you maintain version 6.x, apply 6.9.13-48 or later. Both patches are required to fully address heap-use-after-free; partial upgrades leave vulnerability windows open. Test patched versions in a staging environment to confirm compatibility with your image processing workflows, especially if you use custom delegates or scripting extensions. Coordinate patches across development, staging, and production systems.

Detection guidance

Monitor ImageMagick process crashes or segmentation faults, particularly in logs from image processing services or web upload handlers. Enable verbose logging in ImageMagick to capture file parsing errors. Detection-as-code: watch for unexpected terminations of ImageMagick processes when processing MSL files, and correlate with recent file uploads or batch job submissions. Network-based detection is not feasible since the vulnerability is local-file-triggered. Incident response: if a crash occurs, preserve the triggering image file for forensic analysis to confirm whether a malicious MSL file was involved.

Why prioritize this

While this is a MEDIUM severity vulnerability without active KEV listing or public exploit, it warrants timely patching because: (1) image processing is ubiquitous in web and automation infrastructure; (2) the defect is in memory-unsafe code that could be chained with other flaws; (3) local attackers in multi-user or containerized environments can disrupt shared services; (4) the fix is straightforward and low-risk. Organizations processing user-supplied images should prioritize this within their standard patch cycle (typically 30–60 days for medium-severity items).

Risk score, explained

CVSS 3.1 score of 6.2 (MEDIUM) reflects: local attack vector (AV:L), low complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), unchanged scope (S:U), no confidentiality impact (C:N), no integrity impact (I:N), but high availability impact (A:H). The score appropriately captures that an attacker can reliably crash the process and deny image processing services, but cannot read data or modify files. This aligns with the heap-use-after-free's ability to trigger a fault but not to reliably achieve code execution.

Frequently asked questions

Can this vulnerability be exploited remotely over the network?

Remote exploitation is only possible if an application accepts file uploads (or downloads from untrusted sources) and automatically processes them with vulnerable ImageMagick. The vulnerability itself is local-file-triggered, but the attack surface extends to any internet-facing service that pipes user-supplied images to ImageMagick without patching or sandboxing.

Does patching ImageMagick require application recompilation?

No. ImageMagick is typically deployed as a system library or standalone binary. A standard package update or binary replacement (e.g., via apt, yum, or Docker image rebuild) is sufficient. Applications using ImageMagick as a library will automatically use the patched version after a system-level update. Verify the version string after patching to confirm success.

What is MSL and do I need to process MSL files?

MSL (Magick Scripting Language) is a declarative XML-like format for image processing commands within ImageMagick. Many users never process MSL directly; they work with standard formats (JPEG, PNG, GIF). If your application does not explicitly handle MSL input, you can further reduce risk by disabling MSL support in your ImageMagick configuration, though patching is the primary mitigation.

Is this vulnerability included in the CISA Known Exploited Vulnerabilities catalog?

No. As of the publication date, this vulnerability is not listed in CISA's KEV catalog, indicating no confirmed active exploitation in the wild. However, the absence of KEV status does not reduce the importance of patching; it reflects the vulnerability's current threat landscape rather than its risk.

This analysis is provided for informational and educational purposes only. It is based on publicly available vulnerability data and does not constitute security advice. Organizations must verify all patch version numbers and compatibility requirements against official vendor advisories before deployment. SEC.co makes no warranty regarding the completeness or accuracy of this intelligence and assumes no liability for decisions made in reliance upon it. Always test patches in non-production environments and consult your organization's change management and incident response procedures before applying updates. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).