CVE-2025-66628
ImageMagick: ImageMagick Integer Overflow leading to out of bounds read (32-bit only)
Overview
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.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness: CWE-125
Affected packages · 7
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Julia | ImageMagick_jll | <7.1.2023+0 | 7.1.2023+0 |
| NuGet | Magick.NET-Q16-AnyCPU | <14.10.0 | 14.10.0 |
| NuGet | Magick.NET-Q16-HDRI-AnyCPU | <14.10.0 | 14.10.0 |
| NuGet | Magick.NET-Q16-HDRI-x86 | <14.10.0 | 14.10.0 |
| NuGet | Magick.NET-Q16-x86 | <14.10.0 | 14.10.0 |
| NuGet | Magick.NET-Q8-AnyCPU | <14.10.0 | 14.10.0 |
| NuGet | Magick.NET-Q8-x86 | <14.10.0 | 14.10.0 |
Open a package to see all its vulnerabilities.
Operating systems · 31 fixes
Photon OS 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 5.0 | imagemagick +5 | 7.1.2.11-1.ph5 |
Red Hat 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | imagemagick +5 | eol |
SUSE Linux Enterprise 6 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 12.5 | imagemagick-config-6-suse +5 | 6.8.8.1-71.218.1 | SUSE-SU-2025:4429-1 |
| 15.4 | imagemagick +8 | 7.1.0.9-150400.6.58.1 | SUSE-SU-2026:0013-1 |
| 15.5 | imagemagick +8 | 7.1.0.9-150400.6.58.1 | SUSE-SU-2026:0013-1 |
| 15.6 | imagemagick-config-7-upstream | 7.1.0.9-150400.6.58.1 | SUSE-SU-2026:0013-1 |
| 15.6 | imagemagick +11 | 7.1.1.21-150600.3.32.1 | SUSE-SU-2026:0011-1 |
| 15.7 | imagemagick-config-7-upstream | 7.1.0.9-150400.6.58.1 | SUSE-SU-2026:0013-1 |
2 more rows
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | imagemagick | 7.1.2.12-r0 |
| 3.23 | imagemagick | 7.1.2.12-r0 |
| 3.24 | imagemagick | 7.1.2.12-r0 |
| edge | imagemagick | 7.1.2.12-r0 |
chainguard 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| imagemagick-6 | 6.9.13.46-r1 |
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | imagemagick | 8:6.9.11.60+dfsg-1.3+deb11u8 |
| 12 | imagemagick | 8:6.9.11.60+dfsg-1.6+deb12u5 |
| 13 | imagemagick | 8:7.1.1.43+dfsg1-1+deb13u4 |
| 14 | imagemagick | 8:7.1.2.12+dfsg1-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| imagemagick | 8:6.9.11.60+dfsg-1.6+deb12u5 |
minimos 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| imagemagick | 7.1.2.0-r0 |
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | imagemagick +14 | 7.1.2.10-2.1 | openSUSE-SU-2025:15829-1 |
openSUSE Leap 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 16.0 | imagemagick +13 | 7.1.2.0-160000.5.1 | openSUSE-SU-2026:20118-1 |
root.io debian 3 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-imagemagick | 8:6.9.11.60+dfsg-1.3+deb11u8 |
| 12 | imagemagick +1 | 8:6.9.11.60+dfsg-1.6+deb12u5 |
| 13 | imagemagick +1 | 8:7.1.1.43+dfsg1-1+deb13u4 |
seal Red Hat 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | imagemagick +1 | 6.9.10.68-6.el7_9+sp999 |
ubuntu 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | imagemagick | affected |
| 20.04-ESM | imagemagick | affected |
| 22.04 | imagemagick | affected |
| 24.04 | imagemagick | affected |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2025-66628
- github.com https://github.com/ImageMagick/ImageMagick
- github.com https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-6hjr-v6g4-3fm8
- github.com https://github.com/advisories/GHSA-6hjr-v6g4-3fm8
- github.com https://github.com/dlemstra/Magick.NET/commit/2dfa08e15cfd11016a79615994787b14f9048b1c
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2025-66628
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2025-66628
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.