CVE-2026-25794: ImageMagick has heap-buffer-overflow via signed integer overflow in `WriteUHDRImage` when writing UHDR images with large dimensions
ImageMagick is free and open-source software used for editing and manipulating digital images. `WriteUHDRImage` in `coders/uhdr.c` uses `int` arithmetic to compute the pixel buffer size. Prior to version 7.1.2-15, when image dimensions are large, the multiplication overflows 32-bit `int`, causing an undersized heap allocation followed by an out-of-bounds write. This can crash the process or potentially lead to an out of bounds heap write. Version 7.1.2-15 contains a patch.
Security readout for executives and security teams
Plain-English summary
ImageMagick versions before 7.1.2-15 can miscalculate memory when creating UHDR images with very large dimensions. That can crash image-processing services and may permit an out-of-bounds heap write. Organizations using ImageMagick on untrusted images should treat this as an urgent availability risk.
Executive priority
Prioritize remediation for internet-facing or customer-supplied image workflows. The main documented business risk is service disruption, with possible heap memory corruption. Patch promptly, especially in automated media processing systems.
Technical view
The flaw is in `WriteUHDRImage` in `coders/uhdr.c`. It uses 32-bit signed `int` arithmetic for pixel buffer sizing, so large dimensions can overflow, allocate too little heap memory, then write out of bounds. Sources rate it CVSS 8.2 high, with network attack vector, low complexity, no privileges, and no user interaction.
Likely exposure
Exposure is most likely where ImageMagick before 7.1.2-15 is used by web apps, APIs, batch jobs, or media pipelines to write UHDR images from untrusted or attacker-controlled inputs.
Exploitation context
The provided bundle does not show CISA KEV listing or confirmed active exploitation. The CVSS vector indicates plausible remote triggering where ImageMagick processing is exposed, but the sources do not provide exploit-in-the-wild evidence.
Researcher notes
Key evidence is the signed integer overflow leading to undersized allocation and heap out-of-bounds write in UHDR output handling. Do not assume broader codec impact beyond the cited UHDR write path without vendor evidence.
Mitigation direction
Upgrade ImageMagick to version 7.1.2-15 or later.
Check operating system vendor advisories for backported package fixes.
Restrict untrusted image processing until patched where feasible.
Limit resource consumption for image conversion services.
Monitor ImageMagick-facing services for crashes or abnormal restarts.
Validation and detection
Inventory ImageMagick versions across hosts, containers, and build images.
Identify workloads that write or convert UHDR images.
Confirm packages are version 7.1.2-15 or vendor-patched equivalents.
Review application paths that pass untrusted images to ImageMagick.
Check logs for recent ImageMagick crashes during image conversion.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-122: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-122 · source CWE mapping
Heap-based Buffer Overflow
Heap-based Buffer Overflow represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Integer Overflow or Wraparound represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.