Vulnerability · Published Dec 10, 2025 · Assigned by GitHub_M

CVE-2025-66628ImageMagick is vulnerable to an Integer Overflow in TIM decoder leading to out of bounds read (32-bit only)

High 7.5

In plain English

A high-severity out-of-bounds read in ImageMagick from ImageMagick. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 44% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.5%top 56.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Public PoC

Official description

ImageMagick is a software suite to create, edit, compose, or convert bitmap images. In versions 7.1.2-9 and prior, the TIM (PSX TIM) image parser contains a critical integer overflow vulnerability in its ReadTIMImage function (coders/tim.c). The code reads width and height (16-bit values) from the file header and calculates image_size = 2 * width * height without checking for overflow. On 32-bit systems (or where size_t is 32-bit), this calculation can overflow if width and height are large (e.g., 65535), wrapping around to a small value. This results in a small heap allocation via AcquireQuantumMemory and later operations relying on the dimensions can trigger an out of bounds read. This issue is fixed in version 7.1.2-10.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.22imagemagick7.1.2.12-r0ALPINE-CVE-2025-66628
Alpine:v3.23imagemagick7.1.2.12-r0ALPINE-CVE-2025-66628
Alpine:v3.24imagemagick7.1.2.12-r0ALPINE-CVE-2025-66628
Debian:12imagemagick8:6.9.11.60+dfsg-1.6+deb12u5DEBIAN-CVE-2025-66628
Debian:13imagemagick8:7.1.1.43+dfsg1-1+deb13u4DEBIAN-CVE-2025-66628
Debian:14imagemagick8:7.1.2.12+dfsg1-1DEBIAN-CVE-2025-66628
NuGetmagick.net-q16-anycpu14.10.0GHSA-6hjr-v6g4-3fm8
NuGetmagick.net-q16-hdri-anycpu14.10.0GHSA-6hjr-v6g4-3fm8
NuGetmagick.net-q16-hdri-x8614.10.0GHSA-6hjr-v6g4-3fm8
NuGetmagick.net-q16-x8614.10.0GHSA-6hjr-v6g4-3fm8
NuGetmagick.net-q8-anycpu14.10.0GHSA-6hjr-v6g4-3fm8
NuGetmagick.net-q8-x8614.10.0GHSA-6hjr-v6g4-3fm8
Ubuntu:25.10imagemagickno fix listedUBUNTU-CVE-2025-66628

Affected products (as reported)

VendorProductVersions
ImageMagick ImageMagick < 7.1.2-10

Weakness: CWE-125 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References