CVE-2026-25795 in ImageMagickinfo

Summary

by MITRE • 02/24/2026

ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 7.1.2-15 and 6.9.13-40, in `ReadSFWImage()` (`coders/sfw.c`), when temporary file creation fails, `read_info` is destroyed before its `filename` member is accessed, causing a NULL pointer dereference and crash. Versions 7.1.2-15 and 6.9.13-40 contain a patch.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 04/21/2026

ImageMagick represents a widely deployed image processing library that serves as a foundational component in numerous digital media applications, web platforms, and content management systems across enterprise environments. The vulnerability described in CVE-2026-25795 specifically targets the software's handling of temporary file operations within the ReadSFWImage function, which processes SFW format image files. This flaw exists in the coders/sfw.c source file and demonstrates a classic improper handling of resource cleanup scenarios that can lead to critical system instability.

The technical implementation of this vulnerability stems from a sequence of operations that occur during image file processing when temporary file creation fails. When the system cannot create the necessary temporary file, the code path executes a premature destruction of the read_info structure before properly accessing its filename member. This creates a NULL pointer dereference condition that results in an immediate application crash, effectively causing a denial of service scenario. The flaw represents a direct violation of proper resource management principles and demonstrates inadequate error handling in the face of resource allocation failures.

From an operational perspective, this vulnerability poses significant risks to systems that rely on ImageMagick for image processing workflows, particularly those handling untrusted input from web forms, file uploads, or automated processing pipelines. Attackers could exploit this vulnerability by crafting malicious SFW format files designed to trigger the specific error condition during temporary file creation. The resulting crash would disrupt legitimate image processing services, potentially allowing for repeated denial of service attacks against critical infrastructure components that depend on ImageMagick functionality.

The mitigation strategy for this vulnerability requires immediate deployment of the patched versions 7.1.2-15 and 6.9.13-40, which contain the necessary code modifications to properly handle the temporary file creation failure scenario. Organizations should also implement additional defensive measures such as input validation for image file formats, sandboxed processing environments, and monitoring for unusual crash patterns that might indicate exploitation attempts. This vulnerability aligns with CWE-476, which addresses NULL pointer dereference conditions, and could potentially be leveraged as part of broader attack chains targeting web application image processing capabilities, making it a significant concern for organizations following ATT&CK framework considerations for application layer attacks and denial of service operations.

Responsible

GitHub M

Reservation

02/05/2026

Disclosure

02/24/2026

Moderation

accepted

CPE

ready

EPSS

0.00376

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!