CVE-2026-30935 Overview
ImageMagick, a widely-used free and open-source software suite for editing and manipulating digital images, contains a heap buffer over-read vulnerability in the BilateralBlurImage function. Prior to version 7.1.2-16, an incorrect type conversion causes an out-of-bounds read condition when processing specially crafted images using the -bilateral-blur operation. This vulnerability could allow attackers to read sensitive memory contents or cause application crashes when users process malicious image files.
Critical Impact
An attacker could craft a malicious image file that, when processed with ImageMagick's bilateral blur functionality, triggers an out-of-bounds heap read potentially leading to information disclosure or denial of service.
Affected Products
- ImageMagick versions prior to 7.1.2-16
- Applications and services utilizing ImageMagick for image processing
- Web applications with server-side image manipulation using vulnerable ImageMagick versions
Discovery Timeline
- 2026-03-10 - CVE-2026-30935 published to NVD
- 2026-03-11 - Last updated in NVD database
Technical Details for CVE-2026-30935
Vulnerability Analysis
This vulnerability is classified as CWE-125 (Out-of-Bounds Read), a memory corruption issue that occurs when the software reads data past the end of an allocated buffer. The flaw resides in the BilateralBlurImage function, which implements the bilateral blur image filter. An incorrect type conversion within this function leads to improper boundary calculations, causing the application to read beyond the allocated heap buffer when processing certain image inputs.
The vulnerability requires local access and user interaction, meaning an attacker must convince a victim to process a malicious image file using ImageMagick's bilateral blur operation. While the impact is limited to information disclosure and potential denial of service (rather than code execution), the widespread deployment of ImageMagick in web applications and automated image processing pipelines increases the attack surface.
Root Cause
The root cause is an incorrect type conversion within the BilateralBlurImage function. When calculating buffer boundaries for the bilateral blur operation, an improper conversion leads to incorrect size calculations. This causes the function to attempt reading memory locations beyond the allocated heap buffer, resulting in an out-of-bounds read condition.
Attack Vector
The attack vector requires local access with user interaction. An attacker must craft a specially designed image file that, when processed using ImageMagick's -bilateral-blur operation, triggers the vulnerable code path. The exploitation scenario typically involves:
- Creating a maliciously crafted image file designed to trigger the incorrect conversion
- Delivering the image to a target system where ImageMagick is used for processing
- Having the victim or an automated system process the image with the bilateral blur filter
- The vulnerable function reads beyond heap buffer boundaries, potentially exposing sensitive memory contents
For detailed technical information about the vulnerability mechanism and exploitation conditions, refer to the GitHub Security Advisory.
Detection Methods for CVE-2026-30935
Indicators of Compromise
- Unexpected ImageMagick crashes or segmentation faults during image processing operations
- Error logs indicating memory access violations in BilateralBlurImage or related functions
- Abnormal image files with unusual metadata or malformed headers being processed
- Increased processing failures when using -bilateral-blur operations
Detection Strategies
- Monitor ImageMagick process behavior for signs of memory corruption or abnormal termination
- Implement file integrity monitoring on image upload directories to detect potentially malicious files
- Configure application logging to capture ImageMagick command-line invocations and associated error output
- Use memory sanitizers (ASan, Valgrind) in development and testing environments to detect out-of-bounds reads
Monitoring Recommendations
- Enable verbose logging for ImageMagick operations in production environments
- Monitor system logs for segmentation faults or crashes related to ImageMagick processes
- Implement alerting for unusual patterns in image processing failures
- Track ImageMagick version deployments across infrastructure for vulnerability management
How to Mitigate CVE-2026-30935
Immediate Actions Required
- Upgrade ImageMagick to version 7.1.2-16 or later immediately
- Audit systems and applications to identify all ImageMagick installations
- Restrict image upload functionality to trusted users until patching is complete
- Implement input validation to reject suspicious or malformed image files before processing
Patch Information
The vulnerability has been fixed in ImageMagick version 7.1.2-16. Organizations should update to this version or later to remediate the vulnerability. The fix addresses the incorrect type conversion in the BilateralBlurImage function to ensure proper boundary calculations.
For complete details on the security fix, see the ImageMagick Security Advisory on GitHub.
Workarounds
- Disable or restrict use of the -bilateral-blur operation until patching is feasible
- Implement strict input validation and sanitization for all image files before processing
- Use ImageMagick policy files to restrict dangerous operations and file formats
- Consider running ImageMagick in a sandboxed environment with limited memory access
# ImageMagick policy.xml configuration to restrict risky operations
# Location: /etc/ImageMagick-7/policy.xml
# Limit memory resources to reduce impact of memory-related vulnerabilities
<policy domain="resource" name="memory" value="256MiB"/>
<policy domain="resource" name="map" value="512MiB"/>
<policy domain="resource" name="disk" value="1GiB"/>
# Restrict potentially dangerous coders until patching is complete
<policy domain="coder" rights="none" pattern="MVG" />
<policy domain="coder" rights="none" pattern="MSL" />
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

