CVE-2026-46520: ImageMagick Out-of-Bounds Heap Write Denial of Service
ImageMagick, a widely-used image editing library, contains a memory safety flaw that can crash or destabilize applications when processing multiple images of different sizes. The vulnerability exists in versions before 6.9.13-48 (legacy branch) and 7.1.2-23 (current branch). An attacker can trigger an out-of-bounds write by submitting specially crafted image files, leading to denial of service or potential code execution depending on system configuration and memory layout.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-122, CWE-787
- 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 6.9.13-48 and 7.1.2-23, when reading multiple images with different dimensions an out of bounds heap write can occur. This issue has been patched in versions 6.9.13-48 and 7.1.2-23.
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-46520 is an out-of-bounds heap write vulnerability (CWE-122, CWE-787) in ImageMagick's multi-image processing logic. When the library reads multiple images with differing dimensions without proper bounds validation, a write operation can exceed allocated heap memory. The flaw is network-exploitable with no authentication or user interaction required, affecting both the legacy 6.x and current 7.x release lines. The vulnerability was patched in versions 6.9.13-48 and 7.1.2-23.
Business impact
Organizations deploying ImageMagick in production pipelines—such as web applications processing user-uploaded images, media conversion services, or batch image processing workflows—face availability risk. An attacker can send malformed image files to trigger denial of service, disrupting image upload features, thumbnail generation, or automated media workflows. In sandboxed or memory-constrained environments, heap corruption may enable local privilege escalation or code execution, though the primary impact vector is availability.
Affected systems
ImageMagick versions prior to 6.9.13-48 (6.x branch) and 7.1.2-23 (7.x branch) are vulnerable. Any application or service that links against or calls ImageMagick to process untrusted image files is at risk, including web servers, content management systems, image resizing services, document processors, and media automation tools. Both direct library integration and server-side image processing APIs are in scope.
Exploitability
The vulnerability is exploitable over the network without authentication. An attacker needs only to craft and submit image files with mismatched dimensions to a service that processes them with vulnerable ImageMagick versions. No user interaction is required; automated batch processing increases exposure. However, exploitation complexity is low because it relies on triggering a common operation (multi-image reading) rather than a complex state or configuration.
Remediation
Upgrade ImageMagick to version 6.9.13-48 or later for the legacy branch, or version 7.1.2-23 or later for the current branch. Verify with vendor advisories before deployment. Interim mitigation includes disabling multi-image processing, validating image dimensions before processing, implementing request size limits, and running ImageMagick in a restricted or sandboxed environment with minimal privileges.
Patch guidance
Priority should be placed on upgrading to patched versions 6.9.13-48 (6.x) or 7.1.2-23 (7.x). Organizations using the legacy 6.x branch should plan a migration roadmap to 7.x if extended support is needed. Test patches in non-production environments first, as ImageMagick updates may affect image processing behavior or output quality. If custom builds or distributions are used, verify that your vendor or package maintainer has backported the fix.
Detection guidance
Monitor for image processing errors, memory faults, or application crashes when handling multi-image files or batched image uploads. Implement logging around ImageMagick calls to detect unusual or malformed input. Network-based detection can identify attempts to upload images with inconsistent or suspicious metadata (e.g., dimension mismatches). Intrusion detection systems may flag exploitation attempts if they include known image fuzzing payloads. Heap corruption detection tools and address sanitizers are useful in development and staging environments.
Why prioritize this
This vulnerability carries a CVSS 3.1 score of 7.5 (HIGH severity) due to network exploitability, low attack complexity, and high availability impact. Although not yet listed in the CISA Known Exploited Vulnerabilities catalog, the straightforward exploitation method (sending malformed images) and widespread deployment of ImageMagick in web services make it attractive to attackers. Organizations processing untrusted image uploads should prioritize patching within 30 days.
Risk score, explained
The score reflects a network-accessible denial of service vector with no barriers to exploitation. The absence of confidentiality or integrity impact (C:N, I:N) keeps the score from critical range, but high availability impact (A:H) and universal applicability (S:U) justify HIGH severity. The attack vector (AV:N), low complexity (AC:L), and lack of privilege requirements (PR:N, UI:N) indicate broad exploitability in real-world deployments.
Frequently asked questions
Can this vulnerability lead to remote code execution?
The primary impact is denial of service through heap corruption and memory faults. However, in certain configurations—particularly where ImageMagick runs with elevated privileges or in memory-unsafe contexts—heap writes could potentially be leveraged for code execution. Treat this as a code execution risk until you have patched, especially if ImageMagick processes untrusted input in a high-privilege context.
Do I need to patch if I only process images from trusted sources?
Patching is still recommended. If your application's threat model includes insider threats, compromised upstream sources, or supply chain attacks, untrusted images could still reach your system. Additionally, future security improvements and other bugs are included in patched versions.
Which versions are affected?
Any ImageMagick version before 6.9.13-48 (legacy 6.x branch) or before 7.1.2-23 (current 7.x branch) is vulnerable. Check your deployment with `convert -version` or equivalent API calls to determine your current version.
Can sandboxing reduce the risk until I patch?
Yes. Running ImageMagick in a container, virtual machine, or restricted process with minimal privileges and read-only image inputs can limit the blast radius. However, sandboxing is not a substitute for patching; attackers can still trigger denial of service within the sandbox.
This analysis is based on publicly available vulnerability data as of the publication date. CVSS scores, patch versions, and affected product lines are sourced from official CVE records and vendor advisories. Organizations should verify patch availability and compatibility with their specific deployments before applying updates. This explainer does not constitute security advice; consult your organization's security team and vendor documentation for definitive guidance. No exploit code or weaponization details are provided. The vulnerability landscape is dynamic; refer to SEC.co and CISA resources for updates on active exploitation or new information. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-44421HIGHFreeRDP Heap Buffer Overflow in RDPGFX (CVSS 8.8)
- CVE-2026-46521MEDIUMImageMagick LZMA Out-of-Bounds Write – Patch & Detection Guide
- CVE-2026-46559MEDIUMImageMagick JP2 Heap Buffer Overflow – MEDIUM Severity
- CVE-2026-46692MEDIUMImageMagick Distributed Cache Heap Buffer Overwrite Denial of Service
- CVE-2026-48724MEDIUMImageMagick Heap Buffer Over-Write in Floyd-Steinberg Dithering
- CVE-2026-48994MEDIUMImageMagick MAT Decoder Heap Buffer Overflow on 32-bit Systems
- CVE-2021-4478HIGHDräger CC-Vision Buffer Overflow in .gdt File Parsing
- CVE-2023-43688HIGHMalwarebytes Heap Buffer Overflow Denial of Service Vulnerability