ImageMagick is vulnerable to an integer Overflow in TIM decoder leading to out of bounds read (32-bit only)
Published 10 Dec 2025 · Updated 10 Sept 2026
Is your project on an affected Magick.NET-Q16-AnyCPU?
Look after several .NET apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- <14.10.0
- Fixed in
- 14.10.0
dotnet add package Magick.NET-Q16-AnyCPU --version 14.10.0- Affected
- <14.10.0
- Fixed in
- 14.10.0
dotnet add package Magick.NET-Q16-HDRI-AnyCPU --version 14.10.0- Affected
- <14.10.0
- Fixed in
- 14.10.0
dotnet add package Magick.NET-Q16-HDRI-x86 --version 14.10.0- Affected
- <14.10.0
- Fixed in
- 14.10.0
dotnet add package Magick.NET-Q16-x86 --version 14.10.0- Affected
- <14.10.0
- Fixed in
- 14.10.0
dotnet add package Magick.NET-Q8-AnyCPU --version 14.10.0- Affected
- <14.10.0
- Fixed in
- 14.10.0
dotnet add package Magick.NET-Q8-x86 --version 14.10.0Details
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.
Is GHSA-6hjr-v6g4-3fm8 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected Magick.NET-Q16-AnyCPU, and gives you the command that fixes it.
More advisories for Magick.NET-Q16-AnyCPU
- LowCVE-2026-66011ImageMagick: Memory Leak when providing invalid options to the cli · 2 Sept 2026
- MediumCVE-2026-53466ImageMagick: Heap Buffer Over-Read in XCF decoder due to integer conversion overflow · 31 Jul 2026
- MediumCVE-2026-62946ImageMagick: Integer Overflow in JNX decoder causes heap buffer over-write when processing extremly large files on 32-bit builds · 24 Jul 2026
- MediumCVE-2026-62363ImageMagick: Heap Buffer Over-Write in fx operation · 24 Jul 2026
- MediumCVE-2026-62343ImageMagick: Heap Buffer Over-Write in morphology operation when an invalid kernel is provided · 24 Jul 2026
- LowCVE-2026-61464ImageMagick: Heap Buffer Over-Write in X11 import with crafted window title · 24 Jul 2026
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.