{"id":"CVE-2025-66628","published":"2025-12-10T22:04:49Z","modified":"2025-12-11T15:38:56Z","title":"ImageMagick is vulnerable to an Integer Overflow in TIM decoder leading to out of bounds read (32-bit only)","vendor":"ImageMagick","product":"ImageMagick","tier":"tail","description":{"text":"ImageMagick is a software suite to create, edit, compose, or convert bitmap images. In versions 7.1.2-9 and prior, the TIM (PSX TIM) image parser contains a critical integer overflow vulnerability in its 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. This issue is fixed in version 7.1.2-10.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00551,"percentile":0.46997,"provenance":"source"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"references":[{"url":"https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-6hjr-v6g4-3fm8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/dlemstra/Magick.NET/commit/2dfa08e15cfd11016a79615994787b14f9048b1c","tags":["x_refsource_MISC"]}],"priority":{"score":19.6,"factors":[{"name":"EPSS percentile","points":9.4},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.25}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2025-12-11","earliestUrl":"https://github.com/Sumitshah00/CVE-2025-66628","repos":[{"name":"Sumitshah00/CVE-2025-66628","url":"https://github.com/Sumitshah00/CVE-2025-66628","stars":1,"created":"2025-12-11"}]},"first":{"date":"2025-12-11","source":"PoC-in-GitHub","url":"https://github.com/Sumitshah00/CVE-2025-66628"},"provenance":"source"},"vendorSlug":"imagemagick","affectedVersions":[{"vendor":"ImageMagick","product":"ImageMagick","versions":["< 7.1.2-10"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-12-11T15:38:44.136255Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"NuGet","package":"Magick.NET-Q16-AnyCPU","vulnerableRanges":["<14.10.0"],"patched":["14.10.0"],"from":["GHSA-6hjr-v6g4-3fm8"],"provenance":"source"},{"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-AnyCPU","vulnerableRanges":["<14.10.0"],"patched":["14.10.0"],"from":["GHSA-6hjr-v6g4-3fm8"],"provenance":"source"},{"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-x86","vulnerableRanges":["<14.10.0"],"patched":["14.10.0"],"from":["GHSA-6hjr-v6g4-3fm8"],"provenance":"source"},{"ecosystem":"NuGet","package":"Magick.NET-Q16-x86","vulnerableRanges":["<14.10.0"],"patched":["14.10.0"],"from":["GHSA-6hjr-v6g4-3fm8"],"provenance":"source"},{"ecosystem":"NuGet","package":"Magick.NET-Q8-AnyCPU","vulnerableRanges":["<14.10.0"],"patched":["14.10.0"],"from":["GHSA-6hjr-v6g4-3fm8"],"provenance":"source"},{"ecosystem":"NuGet","package":"Magick.NET-Q8-x86","vulnerableRanges":["<14.10.0"],"patched":["14.10.0"],"from":["GHSA-6hjr-v6g4-3fm8"],"provenance":"source"}],"summary":{"text":"ImageMagick's TIM (PSX TIM) image decoder, in its ReadTIMImage function in coders/tim.c, fails to check for integer overflow when computing the image size from the 16-bit width and height fields in the file header, which on 32-bit systems can wrap to a small allocation and lead to an out-of-bounds read. An attacker can trigger this by supplying a crafted TIM file that ImageMagick processes, with no authentication, privileges or user interaction required, though the flaw only applies where size_t is 32-bit.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:37:04Z"},"euvd":{"id":"EUVD-2025-202428","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-55298","published":"2025-08-26","fixed":"14.8.1","kev":false},{"cve":"CVE-2025-57803","published":"2025-08-26","fixed":"14.8.1","kev":false},{"cve":"CVE-2025-62171","published":"2025-10-17","fixed":"14.9.0","kev":false,"link":{"from":"CVE-2025-62171","to":"CVE-2025-66628","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"NuGet:Magick.NET-Q16-AnyCPU","fromFixed":"14.9.0","toFixed":"14.10.0","daysApart":54},{"kind":"version-step","provenance":"source","package":"NuGet:Magick.NET-Q16-HDRI-AnyCPU","fromFixed":"14.9.0","toFixed":"14.10.0","daysApart":54}]}},{"cve":"CVE-2025-66628","published":"2025-12-10","fixed":"14.10.0","kev":false},{"cve":"CVE-2025-68618","published":"2025-12-30","fixed":"14.10.1","kev":false,"link":{"from":"CVE-2025-66628","to":"CVE-2025-68618","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"NuGet:Magick.NET-Q16-AnyCPU","fromFixed":"14.10.0","toFixed":"14.10.1","daysApart":20},{"kind":"version-step","provenance":"source","package":"NuGet:Magick.NET-Q16-HDRI-AnyCPU","fromFixed":"14.10.0","toFixed":"14.10.1","daysApart":20}]}},{"cve":"CVE-2025-68950","published":"2025-12-30","fixed":"14.10.1","kev":false,"link":{"from":"CVE-2025-66628","to":"CVE-2025-68950","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"NuGet:Magick.NET-Q16-AnyCPU","fromFixed":"14.10.0","toFixed":"14.10.1","daysApart":20},{"kind":"version-step","provenance":"source","package":"NuGet:Magick.NET-Q16-HDRI-AnyCPU","fromFixed":"14.10.0","toFixed":"14.10.1","daysApart":20}]}},{"cve":"CVE-2026-24481","published":"2026-02-24","fixed":"14.10.3","kev":false}],"package":"NuGet:Magick.NET-Q16-AnyCPU"}}