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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.22 | imagemagick | 7.1.2.12-r0 | ALPINE-CVE-2025-66628 |
| Alpine:v3.23 | imagemagick | 7.1.2.12-r0 | ALPINE-CVE-2025-66628 |
| Alpine:v3.24 | imagemagick | 7.1.2.12-r0 | ALPINE-CVE-2025-66628 |
| Debian:12 | imagemagick | 8:6.9.11.60+dfsg-1.6+deb12u5 | DEBIAN-CVE-2025-66628 |
| Debian:13 | imagemagick | 8:7.1.1.43+dfsg1-1+deb13u4 | DEBIAN-CVE-2025-66628 |
| Debian:14 | imagemagick | 8:7.1.2.12+dfsg1-1 | DEBIAN-CVE-2025-66628 |
| NuGet | magick.net-q16-anycpu | 14.10.0 | GHSA-6hjr-v6g4-3fm8 |
| NuGet | magick.net-q16-hdri-anycpu | 14.10.0 | GHSA-6hjr-v6g4-3fm8 |
| NuGet | magick.net-q16-hdri-x86 | 14.10.0 | GHSA-6hjr-v6g4-3fm8 |
| NuGet | magick.net-q16-x86 | 14.10.0 | GHSA-6hjr-v6g4-3fm8 |
| NuGet | magick.net-q8-anycpu | 14.10.0 | GHSA-6hjr-v6g4-3fm8 |
| NuGet | magick.net-q8-x86 | 14.10.0 | GHSA-6hjr-v6g4-3fm8 |
| Ubuntu:25.10 | imagemagick | no fix listed | UBUNTU-CVE-2025-66628 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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