ImageMagick Heap-Buffer Overflow Vulnerability in UHDR Image Writing

Vulnerability

A heap-buffer overflow vulnerability has been identified in ImageMagick versions prior to 7.1.2-15. The issue arises in the 'WriteUHDRImage' function within 'coders/uhdr.c', where signed integer arithmetic is used to calculate the pixel buffer size. This approach can lead to a multiplication overflow when handling large image dimensions, resulting in an inadequate heap allocation. Consequently, this allows for an out-of-bounds write, which can crash the process or potentially be exploited for arbitrary memory manipulation.

Impact

Exploitation of this vulnerability causes a heap-buffer overflow, which can lead to a process crash or an out-of-bounds heap write, potentially allowing for arbitrary memory manipulation.

Reproduction

The vulnerability can be reproduced by using ImageMagick to write UHDR images with large dimensions. The 'WriteUHDRImage' function will incorrectly calculate the pixel buffer size due to signed integer overflow, leading to insufficient heap allocation and out-of-bounds writing.

Remediation

Users can upgrade to ImageMagick version 7.1.2-15 or later to address this vulnerability.

Added: Feb 24, 2026, 1:54 AM
Updated: Feb 24, 2026, 1:54 AM

Vulnerability Rating

Custom Algorithm
spread
7.8
impact
10.0
exploitability
4.0
remediation
7.7
relevance
3.1
threat
1.6
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.