Cloudanix VulnDB

CVE-2026-61861

Low · 3.7

CVSS

3.7

EPSS

0.6%

Published

Jul 11, 2026

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in a common image-processing tool can let a malicious file crash services that convert or generate images, so affected systems should be updated.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
High
Impact
Denial Of Service
Component
Library
Class
Use After Free
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

ImageMagick before 7.1.2-26 contains a use-after-free condition in the FormatMagickCaption method. When ImageMagick processes caption-related image input and an attacker can induce memory allocation failure, a dangling pointer may reference memory that has already been freed. The most likely technical outcome is process crash and denial of service; under favorable heap conditions, memory corruption could potentially be shaped toward arbitrary code execution, although exploitation is high-complexity and currently has no reported mature public exploit.

Why it matters to the business

Systems, applications, CI/CD pipelines, document-processing services, upload handlers, and media transformation workflows that invoke ImageMagick on untrusted or user-supplied content may be vulnerable to crashes or service instability. Because ImageMagick is widely embedded in downstream software, exposure may exist indirectly through web applications, content management systems, thumbnail generators, and file conversion services. The CVSS and EPSS values indicate relatively low immediate exploitation likelihood, and the issue is not currently listed in CISA KEV or associated with ransomware, but organizations should still prioritize remediation where ImageMagick processes untrusted files or is internet-facing through an upload/conversion feature.

How an attack unfolds

An attacker identifies an application or service that passes attacker-controlled input to ImageMagick, especially workflows that use caption rendering or accept ImageMagick pseudo-image syntax such as caption input. The attacker submits crafted content designed to exercise FormatMagickCaption while also driving memory pressure or allocation failure conditions. If the vulnerable error path is reached, ImageMagick may dereference memory after it has been freed, resulting in a crash of the conversion process or worker. In more advanced scenarios, an attacker would attempt repeated submissions and heap manipulation to influence the freed memory region, potentially turning the memory corruption into code execution, although this would require significant reliability work and favorable runtime conditions.

How to fix it

Upgrade ImageMagick to version 7.1.2-26 or later. If using distribution packages, apply the vendor-provided security update that backports the fix, even if the displayed upstream version differs. Where immediate upgrade is not possible, reduce exposure by preventing ImageMagick from processing untrusted caption input, disabling or restricting pseudo-image coders where feasible, isolating ImageMagick execution in a sandbox/container with low privileges, enforcing CPU and memory limits, and placing file conversion workers behind queues with rate limits. Review all direct and transitive dependencies that bundle or invoke ImageMagick, including application frameworks, CMS plugins, media libraries, document converters, and build pipelines.

How to confirm the fix worked

Confirm the installed ImageMagick version is 7.1.2-26 or later, or that the operating system vendor package includes the relevant backported security fix. Validate all execution paths, not just the default system binary, by checking container images, application bundles, static builds, Lambda/serverless layers, CI runners, and third-party tools that ship their own ImageMagick binaries. Run `magick -version`, `convert -version`, and package-manager queries where applicable. Confirm that untrusted uploads or conversion endpoints either use the patched binary or enforce mitigations such as sandboxing and resource limits. Regression-test normal caption rendering and image conversion workflows after patching.

Typical attack path

  1. Find an application, API, worker, or batch process that uses ImageMagick to process user-controlled images or text-to-image caption inputs.
  2. Submit crafted content that causes ImageMagick to invoke caption processing, such as caption-related pseudo-image handling or a workflow that renders text into an image.
  3. Induce allocation failure or memory pressure during FormatMagickCaption execution.
  4. Trigger the use-after-free condition when the code path references a freed pointer.
  5. Cause the ImageMagick process or dependent service worker to crash, resulting in denial of service.
  6. Optionally attempt heap grooming and repeated exploitation to explore whether reliable code execution is possible in the target runtime.

How to detect it

To determine whether exploitation was attempted or successful, review logs from applications, upload endpoints, API gateways, media conversion workers, job queues, container runtimes, and operating system crash facilities. Look for requests or queued jobs involving caption rendering or unusual ImageMagick pseudo-image syntax followed by ImageMagick crashes, segmentation faults, allocation failures, out-of-memory events, worker restarts, or abnormal exits. Relevant sources include web access logs, application error logs, queue payload metadata, container stdout/stderr, systemd journal, kernel logs, crash dumps, core dump metadata, EDR telemetry, and process execution logs for `magick`, `convert`, or dependent wrappers. Pay particular attention to repeated small variations of the same submitted file or caption payload, high-frequency conversion attempts from a single source, conversion jobs that terminate with SIGSEGV/SIGABRT, and logs containing references to FormatMagickCaption or heap-use-after-free from instrumented builds. For forensic review, preserve suspicious input files, conversion command lines, crash dumps, and the exact ImageMagick binary used at the time of the event.

  • FormatMagickCaption
  • caption:
  • magick caption:
  • convert caption:
  • AddressSanitizer: heap-use-after-free
  • heap-use-after-free
  • Segmentation fault
  • SIGSEGV
  • SIGABRT
  • core dumped
  • memory allocation failed
  • cache resources exhausted
  • magick: memory allocation failed
  • convert: memory allocation failed
  • magick: cache resources exhausted
  • convert: cache resources exhausted
  • /usr/bin/magick
  • /usr/bin/convert
  • /usr/local/bin/magick
  • /usr/local/bin/convert

What your security team should do

  • Inventory all ImageMagick installations and embedded copies across servers, containers, developer images, CI/CD runners, media processing workers, and third-party applications.
  • Prioritize upgrade to ImageMagick 7.1.2-26 or later for any service that processes user-supplied files, uploaded images, captions, documents, PDFs, or archive-extracted media.
  • If patching is delayed, restrict ImageMagick policy configuration to disable unnecessary coders and pseudo-protocols, especially workflows that accept caption-style input from untrusted users.
  • Run ImageMagick with least privilege, filesystem isolation, seccomp/AppArmor/SELinux or container sandboxing, and strict CPU, memory, process, and timeout limits.
  • Monitor for repeated ImageMagick crashes, abnormal memory allocation failures, worker restarts, and spikes in conversion errors that may indicate probing or denial-of-service attempts.
  • Review web, API, queue, and worker logs for repeated uploads or conversion requests immediately preceding ImageMagick segmentation faults or out-of-memory conditions.
  • Because exploit maturity is currently reported as none and EPSS is low, treat this as a hygiene and exposure-reduction priority rather than an emergency unless ImageMagick is internet-facing or processes high-volume untrusted content.

The record

ImageMagick before 7.1.2-26 contains a use-after-free vulnerability in the FormatMagickCaption method when memory allocation fails. Attackers can trigger memory allocation failures to cause a dangling pointer to reference freed memory, potentially enabling denial of service or code execution.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities