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

- Priority: **Prioritise**
- Reason: Severe, CVSS 7.5 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability: affected before 7.1.2-10 (CNA); fix release not confirmed
- Status: published
- Published: 2025-12-10 · Modified: 2025-12-11
- Aliases: SUSE-SU-2025:4429-1, UBUNTU-CVE-2025-66628, DEBIAN-CVE-2025-66628, openSUSE-SU-2025:15829-1, CGA-c4w3-4mgg-wqr6, CGA-f46j-p4rw-qmgp, CGA-gr9f-54qj-vqc3, CGA-h922-hgm2-7x7f, CGA-j4wh-vphr-5g67, CGA-p638-wv85-hqcr, GHSA-6hjr-v6g4-3fm8, CGA-w74v-9hfq-w4gm, CGA-x7h2-x87c-fv6r, ALPINE-CVE-2025-66628
- Record: https://cvemate.com/vulnerability/CVE-2025-66628 · JSON: https://cvemate.com/vulnerability/CVE-2025-66628/json

## Description

```text
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.
```

## Signals

- CVSS: 7.5 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- EPSS: 0.551%, percentile 47.547%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine imagemagick (Alpine Linux): \< 7.1.2.12-r0
- chainguard imagemagick-6 (Chainguard): All versions (No fix recorded)
- chainguard imagemagick-6-dev (Chainguard): \< 6.9.13.46-r1
- chainguard imagemagick-6-doc (Chainguard): \< 6.9.13.46-r1
- chainguard imagemagick-6-static (Chainguard): \< 6.9.13.46-r1
- debian imagemagick (Debian): \< 8:6.9.11.60+dfsg-1.6+deb12u5 \| \< 8:7.1.1.43+dfsg1-1+deb13u4 \| \< 8:7.1.2.12+dfsg1-1
- ubuntu imagemagick (Ubuntu): All versions (No fix recorded) \| \< 8:6.7.7.10-6ubuntu3.13+esm29 \| \< 8:6.8.9.9-7ubuntu5.16+esm28 \| \< 8:6.9.7.4+dfsg-16ubuntu6.15+esm20 \| \< 8:6.9.10.23+dfsg-2.1ubuntu11.11+esm18 \| \< 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5+esm18 \| \< 8:6.9.12.98+dfsg1-5.2ubuntu0.1~esm17
- imagemagick imagemagick: \< 7.1.2-10
- NuGet Magick.NET-Q16-AnyCPU (NuGet): \< 14.10.0
- NuGet Magick.NET-Q16-HDRI-AnyCPU (NuGet): \< 14.10.0
- NuGet Magick.NET-Q16-HDRI-x86 (NuGet): \< 14.10.0
- NuGet Magick.NET-Q16-x86 (NuGet): \< 14.10.0
- NuGet Magick.NET-Q8-AnyCPU (NuGet): \< 14.10.0
- NuGet Magick.NET-Q8-x86 (NuGet): \< 14.10.0
- opensuse ImageMagick&distro=openSUSE Tumbleweed (openSUSE): \< 7.1.2.10-2.1
- suse ImageMagick&distro=SUSE Linux Enterprise Server 12 SP5-LTSS (SUSE Linux Enterprise): \< 6.8.8.1-71.218.1
- suse ImageMagick&distro=SUSE Linux Enterprise Server LTSS Extended Security 12 SP5 (SUSE Linux Enterprise): \< 6.8.8.1-71.218.1

## References

- <https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-6hjr-v6g4-3fm8>
- <https://github.com/dlemstra/Magick.NET/commit/2dfa08e15cfd11016a79615994787b14f9048b1c>
- <https://www.suse.com/support/update/announcement/2025/suse-su-20254429-1/>
- <https://bugzilla.suse.com/1254820>
- <https://www.suse.com/security/cve/CVE-2025-66628>
- <https://ubuntu.com/security/CVE-2025-66628>
- <https://www.cve.org/CVERecord?id=CVE-2025-66628>
- <https://security-tracker.debian.org/tracker/CVE-2025-66628>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/66xxx/CVE-2025-66628.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-66628>
- <https://github.com/ImageMagick/ImageMagick>
- <https://security.alpinelinux.org/vuln/CVE-2025-66628>
- <https://ubuntu.com/security/notices/USN-9469-1>

---

Data as of 2026-12-05T04:02:49.032Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
