🛡️ CVE-2025-66628 — imagemagick

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-125 NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

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

Summary

The TIM (PSX TIM) image parser in ImageMagick contains a critical integer overflow vulnerability in the 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.

Vulnerable Code

File: coders/tim.c

```c

width=ReadBlobLSBShort(image);

height=ReadBlobLSBShort(image);

image_size=2*width*height; // Line 234 - NO OVERFLOW CHECK!

```

Impact

This vulnerability can lead to Arbitrary Memory Disclosure due to an out of bounds read on 32-bit systems.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity none, availability none.

Weakness class

CVE-2025-66628 is classified as CWE-125: Out-of-bounds Read. The code reads past the limits of a buffer, exposing adjacent memory contents or crashing the process.

Affected software

CVE-2025-66628 is recorded against 7 packages.

  • imagemagick (fixed in 7.1.2-10)
  • magick.net-q16-anycpu (fixed in 14.10.0)
  • magick.net-q16-hdri-anycpu (fixed in 14.10.0)
  • magick.net-q16-hdri-x86 (fixed in 14.10.0)
  • magick.net-q16-x86 (fixed in 14.10.0)
  • magick.net-q8-anycpu (fixed in 14.10.0)
  • magick.net-q8-x86 (fixed in 14.10.0)

Timeline and source

Published on 10 December 2025 and last revised on 17 June 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

github.com
github.com

CVE-2025-66628 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CWE CWE-125
Public Exploit ✅ No
Source NVD
Published 2025-12-10
Updated 2026-08-12
Modified 2026-06-17

Affected Packages

Software From version Fixed in
imagemagick 7.1.2-10
magick.net-q16-anycpu 14.10.0
magick.net-q16-hdri-anycpu 14.10.0
magick.net-q16-hdri-x86 14.10.0
magick.net-q16-x86 14.10.0
magick.net-q8-anycpu 14.10.0
magick.net-q8-x86 14.10.0

Similar Threats

Site Security Check

Is imagemagick part of your stack?

CVE-2025-66628 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.