Loading...
Skip to main content

CVE-2025-66628 — Vulnerability in Magick.NET-Q16-HDRI-x86 — CVE...

HIGH

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

Published December 10, 2025Updated September 10, 2026Source: osv

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` ```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 (306 days ago).
  • Last revised September 10, 2026 — 274 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update Magick.NET-Q16-HDRI-x86 to 14.10.0 or later
dotnet add package Magick.NET-Q16-HDRI-x86 --version 14.10.0
NuGet
Update Magick.NET-Q16-x86 to 14.10.0 or later
dotnet add package Magick.NET-Q16-x86 --version 14.10.0
NuGet
Update Magick.NET-Q16-HDRI-AnyCPU to 14.10.0 or later
dotnet add package Magick.NET-Q16-HDRI-AnyCPU --version 14.10.0
NuGet
Update Magick.NET-Q8-AnyCPU to 14.10.0 or later
dotnet add package Magick.NET-Q8-AnyCPU --version 14.10.0
NuGet
Update Magick.NET-Q16-AnyCPU to 14.10.0 or later
dotnet add package Magick.NET-Q16-AnyCPU --version 14.10.0
NuGet
Update Magick.NET-Q8-x86 to 14.10.0 or later
dotnet add package Magick.NET-Q8-x86 --version 14.10.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (6)

Affects 1 ecosystem: nuget (6).

PackageEcosystemAffectedFixed In
Magick.NET-Q16-HDRI-x86
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+199 more)14.10.0
Magick.NET-Q16-x86
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+218 more)14.10.0
Magick.NET-Q16-HDRI-AnyCPU
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+199 more)14.10.0
Magick.NET-Q8-AnyCPU
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+202 more)14.10.0
Magick.NET-Q16-AnyCPU
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+202 more)14.10.0
Magick.NET-Q8-x86
nuget
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-125
    Out-of-bounds ReadMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.

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

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). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-66628 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.5

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-6hjr-v6g4-3fm8

Related CVEs

  • CVE-2026-46520
    HIGH

    ImageMagick: Heap Buffer Over-Write in IPL decoder when reading multiple images of different dimensions

  • CVE-2026-53461
    HIGH

    ImageMagick has out-of-bounds write in ICON decoder due to incorrect loop

  • CVE-2025-57803
    HIGH

    ImageMagick (WriteBMPImage): 32-bit integer overflow when writing BMP scanline stride → heap buffer overflow

  • CVE-2026-22770
    MEDIUM

    ImageMagick releases an invalid pointer in BilateralBlur when memory allocation fails

  • CVE-2025-68950
    MEDIUM

    ImageMagick's failure to limit MVG mutual causes Stack Overflow

  • CVE-2026-25796
    MEDIUM

    ImageMagick has memory leak of watermark Image object in ReadSTEGANOImage on multiple error/early-return paths

  • CVE-2026-25797
    MEDIUM

    ImageMagick: Code Injection via PostScript header in ps coders

  • CVE-2026-61465
    LOW

    ImageMagick: Policy Bypass possible with matrix-backed operations

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies