CVE-2025-66628: Magick.NET Q16 AnyCPU ImageMagick Is Vulnerable To An Vulnerability
HIGHCVE-2025-66628 is a HIGH (CVSS 7.5) imagemagick is vulnerable to an vulnerability (CWE-125: Out-of-bounds Read) affecting Magick.NET Q16 AnyCPU libraries in the NuGet ecosystem. The issue involves imagemagick is vulnerable to an integer overflow in tim decoder leading to out of bounds read (32-bit only). Remediation is available by upgrading affected packages to version 14.10.0.
CVE-2025-66628 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2025-66628
To remediate this vulnerability, upgrade all affected Magick.NET Q16 AnyCPU dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade Magick.NET-Q16-AnyCPU to 14.10.0
Upgrade Magick.NET-Q16-HDRI-AnyCPU to 14.10.0
Upgrade Magick.NET-Q16-HDRI-x86 to 14.10.0
Upgrade Magick.NET-Q16-x86 to 14.10.0
Upgrade Magick.NET-Q8-AnyCPU to 14.10.0
Upgrade Magick.NET-Q8-x86 to 14.10.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for Magick.NET-Q16-AnyCPU
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-66628, inspect your project dependencies for Magick.NET Q16 AnyCPU:
inspect dependencies for Magick.NET-Q16-AnyCPU
Analyze the terminal output to locate any version of Magick.NET Q16 AnyCPU in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 14.10.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Magick.NET Q16 AnyCPU, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-66628 Affected Magick.NET Q16 AnyCPU Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Magick.NET-Q16-AnyCPU
|
NuGet |
< 14.10.0
|
14.10.0
|
|
Magick.NET-Q16-HDRI-AnyCPU
|
NuGet |
< 14.10.0
|
14.10.0
|
|
Magick.NET-Q16-HDRI-x86
|
NuGet |
< 14.10.0
|
14.10.0
|
|
Magick.NET-Q16-x86
|
NuGet |
< 14.10.0
|
14.10.0
|
|
Magick.NET-Q8-AnyCPU
|
NuGet |
< 14.10.0
|
14.10.0
|
|
Magick.NET-Q8-x86
|
NuGet |
< 14.10.0
|
14.10.0
|
References
Frequently Asked Questions
What is CVE-2025-66628?
Which Magick.NET Q16 AnyCPU versions are affected?
What version fixes CVE-2025-66628?
Is Magick.NET-Q16-AnyCPU affected?
Is Magick.NET-Q16-HDRI-AnyCPU affected?
What is the CVSS score of CVE-2025-66628?
What CWE is associated with CVE-2025-66628?
How can I check NuGet dependencies for CVE-2025-66628?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6hjr-v6g4-3fm8",
"modified" : "2025-12-10T15:47:42Z",
"published" : "2025-12-10T15:47:42Z",
"aliases" : [ "CVE-2025-66628" ],
"summary" : "ImageMagick is vulnerable to an integer Overflow in TIM decoder leading to out of bounds read (32-bit only)",
"details" : "### Summary\nThe 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.\nOn 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.\n### Vulnerable Code\nFile: `coders/tim.c`\n```c\nwidth=ReadBlobLSBShort(image);\nheight=ReadBlobLSBShort(image);\nimage_size=2*width*height; // Line 234 - NO OVERFLOW CHECK!\n```\n\n### Impact\nThis vulnerability can lead to Arbitrary Memory Disclosure due to an out of bounds read on 32-bit systems.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "NuGet",
"name" : "Magick.NET-Q16-AnyCPU"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "14.10.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Magick.NET-Q16-HDRI-AnyCPU"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "14.10.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Magick.NET-Q16-HDRI-x86"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "14.10.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Magick.NET-Q16-x86"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "14.10.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Magick.NET-Q8-AnyCPU"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "14.10.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Magick.NET-Q8-x86"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "14.10.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-6hjr-v6g4-3fm8"
}, {
"type" : "WEB",
"url" : "https://github.com/dlemstra/Magick.NET/commit/2dfa08e15cfd11016a79615994787b14f9048b1c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ImageMagick/ImageMagick"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-10T15:47:42Z",
"nvd_published_at" : null
}
}