CVE-2026-64685 in ImageMagickinfo

Summary

by MITRE • 07/30/2026

ImageMagick is free and open-source software used for editing and manipulating digital images. In versions prior to 7.1.2-27, the BGR decoder does not check for an end-of-file in every location so a crafted image could result in an heap buffer over-read. This issue has been fixed in version 7.1.2-27.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 07/30/2026

ImageMagick represents a widely deployed suite of software tools for digital image processing and manipulation across numerous operating systems and platforms. The software's extensive functionality includes support for dozens of image formats through its comprehensive decoder ecosystem. Vulnerabilities within these decoders pose significant risks to systems that process untrusted image files, particularly in web applications, file upload mechanisms, and automated image processing workflows where user-supplied content is common.

The specific vulnerability resides within the BGR (Blue-Green-Red) color format decoder implementation in ImageMagick versions prior to 7.1.2-27. This decoder processes image data that follows the BGR pixel ordering convention commonly found in certain bitmap formats and some video codecs. The flaw manifests as an inadequate end-of-file boundary check during the decoding process, where the software fails to validate buffer boundaries at critical parsing points. When encountering a maliciously crafted image file with malformed BGR data, the decoder continues reading beyond allocated memory boundaries, resulting in heap buffer over-read conditions that can expose sensitive memory contents.

The operational impact of this vulnerability extends beyond simple denial-of-service scenarios. An attacker could potentially exploit this heap overflow to read arbitrary memory locations, possibly extracting confidential information from process memory, including cryptographic keys, user credentials, or application state data. The vulnerability's exploitation requires crafting a specific image file that triggers the malformed BGR parsing path, making it suitable for targeted attacks in web applications that process untrusted image uploads or render third-party images without proper sanitization. This weakness directly aligns with CWE-129 and CWE-787, representing insufficient input validation and out-of-bounds read vulnerabilities respectively.

Mitigation strategies should prioritize immediate patching of ImageMagick installations to version 7.1.2-27 or later, which includes the necessary boundary checks in the BGR decoder implementation. Organizations should also implement additional defensive measures such as restricting image file uploads to known good formats and sizes, deploying sandboxed execution environments for image processing tasks, and implementing proper input validation at multiple layers of the application stack. Network-level protections like content filtering and web application firewalls can provide additional defense-in-depth against exploitation attempts. The vulnerability demonstrates how seemingly minor decoder implementation flaws can create significant security risks in widely-used software libraries that handle untrusted binary data processing.

Responsible

GitHub M

Reservation

07/20/2026

Disclosure

07/30/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!