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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.55%, higher than 47% of CVEs (2026-12-01)
- Published: 2025-12-10T15:47:42.000Z
- Modified: 2026-09-25T23:10:00.463Z
- Also known as: GHSA-6hjr-v6g4-3fm8
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- ImageMagick ImageMagick: < 7.1.2-10; before 7.1.2-10
- Magick.NET-Q16-AnyCPU (NuGet): before 14.10.0
- Magick.NET-Q16-HDRI-AnyCPU (NuGet): before 14.10.0
- Magick.NET-Q16-HDRI-x86 (NuGet): before 14.10.0
- Magick.NET-Q16-x86 (NuGet): before 14.10.0
- Magick.NET-Q8-AnyCPU (NuGet): before 14.10.0
- Magick.NET-Q8-x86 (NuGet): before 14.10.0

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-6hjr-v6g4-3fm8> (vendor-advisory, web)
- <https://github.com/dlemstra/Magick.NET/commit/2dfa08e15cfd11016a79615994787b14f9048b1c> (patch, web)
- <https://github.com/ImageMagick/ImageMagick> (package)

## Sources

- CVE List: [CVE-2025-66628](https://www.cve.org/CVERecord?id=CVE-2025-66628), CVE Terms of Use, modified 2025-12-11
- GitHub Advisory Database: [GHSA-6hjr-v6g4-3fm8](https://github.com/advisories/GHSA-6hjr-v6g4-3fm8), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-66628](https://nvd.nist.gov/vuln/detail/CVE-2025-66628), Public domain, modified 2026-09-25

---

Page: https://cve.day/CVE-2025-66628 · Whole record: https://cve.day/CVE-2025-66628.json · Rebuilt by cve.day 2026-11-25T22:59:09.209Z
