CVE-2025-66628 — Vulnerability in Magick.NET-Q16-HDRI-x86
ImageMagick is vulnerable to an integer Overflow in TIM decoder leading to out of bounds read (32-bit only)
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.57%). Schedule for your next planned update.
Does your project use an affected Magick.NET-Q16-HDRI-x86 version?
Paste your packages.lock.json to check it for CVE-2025-66628 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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
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.
Advisory Timeline
- First published December 10, 2025 (351 days ago).
- Last revised September 10, 2026 — 274 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
dotnet add package Magick.NET-Q16-HDRI-x86 --version 14.10.0
dotnet add package Magick.NET-Q16-x86 --version 14.10.0
dotnet add package Magick.NET-Q16-HDRI-AnyCPU --version 14.10.0
dotnet add package Magick.NET-Q8-AnyCPU --version 14.10.0
dotnet add package Magick.NET-Q16-AnyCPU --version 14.10.0
dotnet add package Magick.NET-Q8-x86 --version 14.10.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (6)
Affects 1 ecosystem: NuGet (6).
| Package | Fixed In |
|---|---|
| Magick.NET-Q16-HDRI-x86 NuGet · Affected: 10.0.0, 10.1.0, 11.0.0, 11.1.0 (+199 more) | 14.10.0 |
| Magick.NET-Q16-x86 NuGet · Affected: 10.0.0, 10.1.0, 11.0.0, 11.1.0 (+218 more) | 14.10.0 |
| Magick.NET-Q16-HDRI-AnyCPU NuGet · Affected: 10.0.0, 10.1.0, 11.0.0, 11.1.0 (+199 more) | 14.10.0 |
| Magick.NET-Q8-AnyCPU NuGet · Affected: 10.0.0, 10.1.0, 11.0.0, 11.1.0 (+202 more) | 14.10.0 |
| Magick.NET-Q16-AnyCPU NuGet · Affected: 10.0.0, 10.1.0, 11.0.0, 11.1.0 (+202 more) | 14.10.0 |
| Magick.NET-Q8-x86 NuGet · Affected: 10.0.0, 10.1.0, 11.0.0, 11.1.0 (+218 more) | 14.10.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-125Out-of-bounds ReadMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
References
Frequently Asked Questions
- What is CVE-2025-66628?
- ImageMagick is vulnerable to an integer Overflow in TIM decoder leading to out of bounds read (32-bit only). This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
- How do I check if my project is affected by CVE-2025-66628?
- CVE-2025-66628 affects Magick.NET-Q16-HDRI-x86, Magick.NET-Q16-x86 and Magick.NET-Q16-HDRI-AnyCPU (and 3 more). It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-66628 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 41.2% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-24481HIGH
ImageMagick has Possible Heap Information Disclosure in PSD ZIP Decompression
- CVE-2025-53015HIGH
ImageMagick has XMP profile write that triggers hang due to unbounded loop
- CVE-2026-48994MEDIUM
ImageMagick has a Heap Buffer Over-Write in MAT decoder on 32-bit systems
- CVE-2026-46559MEDIUM
ImageMagick: Heap Buffer Over-Write of a single byte in the JP2 encoder.
- GHSA-98cp-rj9f-6v5gMEDIUM
ImageMagick has has a stack-buffer-overflow in MNG encoder with oversized pallete
- CVE-2026-25982MEDIUM
ImageMagick has Heap Out-of-Bounds Read in DCM Decoder (ReadDCMImage)
- CVE-2026-61871LOW
ImageMagick: Memory Leak in ICON decoder when allocation fails
- CVE-2026-61872LOW
ImageMagick: Memory Leak in TIFF encoder when invalid tiff:tile-geometry is specified