CVE-2025-53019
NoneCVSS
—
EPSS
0.6%
Published
Jul 14, 2025
CISA due date
—
Cloudanix analysis
A bug in widely used image software can waste memory when certain file names are processed, potentially causing slowdowns or crashes on affected systems.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw triggers a memory leak in the magick stream command when a filename template contains multiple consecutive %d format specifiers, causing repeated allocations without corresponding frees.
Why it matters to the business
Sustained use of affected ImageMagick installations can gradually exhaust available memory, leading to degraded performance, service instability, or forced restarts on systems that process images via command-line tools or dependent applications.
How an attack unfolds
An attacker invokes the magick stream command with a crafted output filename containing multiple consecutive %d specifiers; each execution allocates memory that is never released, enabling gradual resource exhaustion when the command is run repeatedly through scripts or automated workflows.
How to fix it
Upgrade to ImageMagick 7.1.2-0 or 6.9.13-26. For source builds, apply commit 3fcd081c0278427fc0e8ac40ef75c0a1537792f7 to imagemagick or commit 363f86d818f807e49269287be9c326f658379685 to imagemagick6. Where immediate patching is not possible, restrict use of the stream subcommand and sanitize filename templates in calling scripts.
How to confirm the fix worked
Confirm the installed version meets or exceeds 7.1.2-0 or 6.9.13-26, then execute the stream command with a test template containing multiple consecutive %d specifiers while monitoring process memory to verify leaks no longer occur.
Typical attack path
- Locate systems or containers running vulnerable ImageMagick versions
- Identify or create workflows that invoke the magick stream subcommand
- Supply a filename template containing multiple consecutive %d specifiers
- Execute the command repeatedly to trigger cumulative memory leaks
How to detect it
Review command-line audit logs and process execution history for repeated invocations of the magick stream subcommand; correlate with rising memory usage in ImageMagick processes and inspect any automated image-processing workflows.
What your security team should do
- Apply the listed fixed versions or commits immediately on all ImageMagick instances
- Inventory and replace any custom scripts or pipelines that invoke magick stream
- Implement memory usage monitoring and alerting for ImageMagick processes
- Review downstream packages that bundle ImageMagick for coordinated updates
The record
ImageMagick is free and open-source software used for editing and manipulating digital images. In versions prior to 7.1.2-0 and 6.9.13-26, in ImageMagick's `magick stream` command, specifying multiple consecutive `%d` format specifiers in a filename template causes a memory leak. Versions 7.1.2-0 and 6.9.13-26 fix the issue.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| NuGet | Magick.NET-Q16-AnyCPU | 0 | 14.7.0 |
| NuGet | Magick.NET-Q16-HDRI-AnyCPU | 0 | 14.7.0 |
| NuGet | Magick.NET-Q16-HDRI-OpenMP-arm64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q16-HDRI-OpenMP-x64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q16-HDRI-arm64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q16-HDRI-x64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q16-HDRI-x86 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q16-OpenMP-arm64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q16-OpenMP-x64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q16-arm64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q16-x64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q16-x86 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q8-AnyCPU | 0 | 14.7.0 |
| NuGet | Magick.NET-Q8-OpenMP-arm64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q8-OpenMP-x64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q8-arm64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q8-x64 | 0 | 14.7.0 |
| NuGet | Magick.NET-Q8-x86 | 0 | 14.7.0 |
| Chainguard | imagemagick-6 | 0 | 0 |
| Chainguard | imagemagick-6-dev | 0 | 0 |
| Chainguard | imagemagick-6-doc | 0 | 0 |
| Chainguard | imagemagick-6-static | 0 | 0 |
| Debian:11 | imagemagick | 0 | No fix |
| Debian:12 | imagemagick | 0 | No fix |
| Debian:13 | imagemagick | 0 | No fix |
| Debian:14 | imagemagick | 0 | No fix |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP6 | ImageMagick | 0 | 7.1.0.9-150400.6.33.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP6 | ImageMagick | 0 | 7.1.1.21-150600.3.13.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP7 | ImageMagick | 0 | 7.1.0.9-150400.6.33.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | ImageMagick | 0 | 7.1.1.21-150600.3.13.1 |
| openSUSE:Leap 15.6 | ImageMagick | 0 | 7.1.1.21-150600.3.13.1 |
| openSUSE:Tumbleweed | ImageMagick | 0 | 7.1.2.0-1.1 |
Related vulnerabilities
- CVE-2026-27799 ImageMagick is free and open-source software used for editing and manipulating digital… Also affects Magick.NET-Q16-AnyCPU
- CVE-2026-27798 ImageMagick is free and open-source software used for editing and manipulating digital… Also affects Magick.NET-Q16-AnyCPU
- GHSA-r99p-5442-q2x2 ImageMagick has a heap Buffer Over-read in its DJVU image format handler Also affects Magick.NET-Q16-AnyCPU
- GHSA-qpgx-jfcq-r59f ImageMagick: Heap Buffer Over-read in WaveletDenoise when processing small images Also affects Magick.NET-Q16-AnyCPU
- GHSA-gq5v-qf8q-fp77 ImageMagick: Heap-based Buffer Overflow in GetPixelIndex due to metadata-cache… Also affects Magick.NET-Q16-AnyCPU
- GHSA-wfx3-6g53-9fgc ImageMagick: Memory Leak in multiple coders that write raw pixel data Also affects Magick.NET-Q16-AnyCPU
- GHSA-3q5f-gmjc-38r8 ImageMagick: Memory leak in coders/txt.c without freetype Also affects Magick.NET-Q16-AnyCPU
- GHSA-xpg8-7m6m-jf56 ImageMagick: SVG-to-MVG Command Injection via coders/svg.c Also affects Magick.NET-Q16-AnyCPU