CVE-2025-53101
7.4ImageMagick · ImageMagick
A buffer underflow vulnerability in ImageMagick allows remote attackers to cause a stack overflow and crash the application, or potentially corrupt memory, via crafted filename templates.
Executive summary
A heap-based stack underflow in ImageMagick allows unauthenticated remote attackers to trigger memory corruption via maliciously crafted image filenames.
Vulnerability
This vulnerability exists in the magick mogrify command, where multiple consecutive %d format specifiers trigger incorrect pointer arithmetic. An unauthenticated attacker can exploit this to cause a buffer underflow during vsnprintf operations, leading to potential integrity and availability impacts.
Business impact
The vulnerability carries a CVSS score of 7.4, reflecting a significant risk to system integrity and availability. Successful exploitation could result in service disruption or unauthorized memory manipulation, which may be leveraged to compromise host systems that process untrusted image files.
Remediation
Immediate Action: Update all instances of ImageMagick to version 7.1.2-0 or 6.9.13-26 or later, or apply the specific version patch provided by your distribution vendor.
Proactive Monitoring: Review application logs for errors related to the mogrify command or unusual process crashes during image processing tasks.
Compensating Controls: Implement input validation on all user-supplied filenames and sanitize image metadata before passing them to the ImageMagick utility to prevent the injection of malicious format specifiers.
Exploitation status
Public Exploit Available: Unknown
Analyst recommendation
Given the potential for memory corruption and the availability of proof-of-concept information, organizations should prioritize patching ImageMagick in all environments where it processes external or untrusted data. Ensure that all downstream dependencies, such as the Magick.NET NuGet packages, are updated to their respective fixed versions to maintain a secure posture.