CVE-2026-46521 ImageMagick LZMA Out-of-Bounds Write – Patch & Detection Guide
ImageMagick, a widely-used open-source image manipulation library, contains a flaw in its LZMA compression handling within the MIFF encoder. When processing specially crafted image files, the software can write data beyond allocated memory boundaries, potentially crashing the application or corrupting system memory. This vulnerability affects versions prior to 6.9.13-48 (legacy branch) and 7.1.2-23 (current branch).
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-131, CWE-252, CWE-787, CWE-835
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-10 / 2026-06-17
NVD description (verbatim)
ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 6.9.13-48 and 7.1.2-23, when using LZMA compression in the MIFF encoder an out of bounds write can occur due to a missing check. This issue has been patched in versions 6.9.13-48 and 7.1.2-23.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-46521 is an out-of-bounds write vulnerability (CWE-787) in ImageMagick's MIFF encoder when LZMA compression is used. The root cause is a missing bounds check during compression operations, allowing an attacker to write beyond buffer limits. The vulnerability also relates to improper exception handling (CWE-252) and integer underflow conditions (CWE-131, CWE-835). The CVSS 3.1 score of 5.5 (MEDIUM) reflects local attack vector, no user privilege requirement, but significant availability impact. Exploitation requires user interaction to open a malicious image file.
Business impact
Organizations using ImageMagick for automated image processing, content management systems, or web-based image editing services face denial-of-service risk. If ImageMagick runs with elevated privileges or in a service context processing untrusted images, memory corruption could lead to application crashes, service interruptions, or unpredictable behavior. The vulnerability is not currently exploited in the wild (not on CISA KEV list), reducing immediate threat but warranting planned remediation.
Affected systems
ImageMagick versions prior to 6.9.13-48 and 7.1.2-23 are vulnerable. This includes any deployment running the legacy 6.9.x series or the 7.1.x series before the specified patch versions. Systems that process user-supplied images or integrate ImageMagick into document processing, thumbnail generation, or graphic conversion pipelines are at risk.
Exploitability
Exploitation requires local access and user interaction—specifically, convincing or tricking a user to open a malicious MIFF image file with LZMA compression enabled. The barrier to exploitation is moderate: an attacker must craft a specific file type that ImageMagick will process. No network vector, no privilege escalation, and no authentication bypass is present. The likelihood of accidental triggering via legitimate workflows is low.
Remediation
Upgrade ImageMagick to version 6.9.13-48 or later for the legacy branch, or to version 7.1.2-23 or later for the current branch. Organizations should verify their deployment branch before patching. For environments unable to patch immediately, restrict image processing to trusted sources and consider disabling LZMA compression support if operationally feasible.
Patch guidance
Check your current ImageMagick version using `identify -version`. If you are on the 6.9.x branch (legacy, no longer actively maintained), update to 6.9.13-48 or migrate to the 7.1.x series. If on 7.1.x, update to 7.1.2-23 or later. Many Linux distributions and package managers provide ImageMagick; verify patch availability through your distribution's security advisories. Vendors and applications embedding ImageMagick (such as PHP ImageMagick extensions, Python bindings, or custom integrations) should also be updated.
Detection guidance
Monitor for crashes or unexpected termination of ImageMagick-dependent services when processing MIFF files. Audit logs may show segmentation faults or memory protection violations. Network-based detection is unlikely since the vulnerability is local. Consider enabling application-level logging for ImageMagick operations and correlate with system-level memory errors. Intrusion detection systems cannot easily flag this without deep inspection of MIFF file structure and compression headers.
Why prioritize this
Although the CVSS score is MEDIUM (5.5) and the vulnerability is not yet weaponized in the wild, it should be treated as a baseline maintenance priority. Organizations heavily reliant on ImageMagick for content processing (media sites, document management, SaaS platforms) should prioritize within the next 30–60 days. Lower-priority for organizations with minimal ImageMagick usage or robust input validation. The lack of KEV inclusion indicates no active exploitation campaign, allowing time for deliberate planning.
Risk score, explained
The CVSS 3.1 score of 5.5 reflects: (1) local attack vector (AV:L)—requiring either local system access or user interaction; (2) no authentication needed (PR:N); (3) single context (S:U); (4) no confidentiality or integrity impact (C:N, I:N); (5) high availability impact (A:H)—the out-of-bounds write can crash the process. The score does not account for real-world factors like limited MIFF adoption or the requirement to convince users to open a crafted file, which in practice lower risk for most organizations.
Frequently asked questions
Is this vulnerability remotely exploitable?
No. The CVSS vector shows a local attack vector (AV:L). Exploitation requires either direct access to the system or requires a user to open a malicious file. Web servers or services that automatically process user-uploaded MIFF images are at higher risk because they reduce the user-interaction barrier.
How widely is ImageMagick used?
ImageMagick is extremely common in open-source ecosystems and is bundled with or integrated into countless applications—WordPress plugins, content management systems, image processing APIs, and Linux distributions. Many developers use it without realizing; check for 'convert', 'identify', 'mogrify', or 'magick' commands or library calls in your environment.
Can I work around this vulnerability without patching?
Partial mitigation is possible: disable MIFF format support if not needed, reject MIFF files at the application layer, or process only images from trusted sources. However, these are temporary measures. Patching is the recommended solution.
Will this vulnerability be added to the CISA KEV catalog?
Currently, it is not on the KEV list, indicating no known active exploitation. However, KEV status can change if exploitation is discovered. Organizations should not rely on KEV inclusion as the sole trigger for patching.
This analysis is provided for informational purposes and reflects publicly available information as of the publish date. CVSS scores and severity ratings are based on vendor disclosures and NIST assessments. Actual risk varies by organizational context, deployment architecture, and business risk tolerance. Organizations should verify patch availability and compatibility in their own environments before deployment. This page does not constitute formal security advice or incident response guidance. Consult official vendor advisories and your internal security team for authoritative remediation decisions. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).
Affected vendors
Related vulnerabilities
- CVE-2026-46559MEDIUMImageMagick JP2 Heap Buffer Overflow – MEDIUM Severity
- CVE-2026-48724MEDIUMImageMagick Heap Buffer Over-Write in Floyd-Steinberg Dithering
- CVE-2026-48733MEDIUMImageMagick Infinite Loop Denial-of-Service Vulnerability
- CVE-2026-46520HIGHImageMagick Out-of-Bounds Heap Write Denial of Service
- CVE-2026-46522HIGHImageMagick MIFF Decoder Infinite Loop DoS Vulnerability
- CVE-2025-10238MEDIUMThinkPad BIOS Out-of-Bounds Write, SMM Code Execution Risk
- CVE-2025-59614MEDIUMQualcomm Memory Corruption in RNG Command Handling
- CVE-2026-10028MEDIUMglib-networking GnuTLS Certificate Validation Denial-of-Service