{"id":"JLSEC-2026-929","summary":"ImageMagick is vulnerable to an integer Overflow in TIM decoder leading to out of bounds read (32-bit only)","details":"### Summary\n\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\n### Vulnerable Code\n\nFile: `coders/tim.c`\n\n```c\nwidth=ReadBlobLSBShort(image);\nheight=ReadBlobLSBShort(image);\nimage_size=2*width*height;       // Line 234 - NO OVERFLOW CHECK!\n```\n\n### Impact\n\nThis vulnerability can lead to Arbitrary Memory Disclosure due to an out of bounds read on 32-bit systems.","modified":"2026-07-30T18:35:39.193052738Z","published":"2026-07-30T16:02:27.435Z","upstream":["CVE-2025-66628","EUVD-2025-202428","GHSA-6hjr-v6g4-3fm8"],"database_specific":{"sources":[{"database_specific":{"status":"Analyzed"},"id":"CVE-2025-66628","imported":"2026-07-30T14:08:44.499Z","modified":"2026-06-17T09:57:07.850Z","published":"2025-12-10T22:16:28.660Z","url":"https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2025-66628","html_url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66628"},{"url":"https://api.github.com/advisories/GHSA-6hjr-v6g4-3fm8","html_url":"https://github.com/advisories/GHSA-6hjr-v6g4-3fm8","id":"GHSA-6hjr-v6g4-3fm8","imported":"2026-07-30T14:09:39.037Z","modified":"2025-12-10T15:47:44Z","published":"2025-12-10T15:47:42Z"},{"published":"2025-12-10T22:04:49Z","url":"https://euvdservices.enisa.europa.eu/api/enisaid?id=EUVD-2025-202428","html_url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-202428","id":"EUVD-2025-202428","imported":"2026-07-30T14:08:55.679Z","modified":"2025-12-11T15:38:56Z"}],"license":"CC-BY-4.0"},"references":[{"type":"WEB","url":"https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-6hjr-v6g4-3fm8"},{"type":"WEB","url":"https://github.com/advisories/GHSA-6hjr-v6g4-3fm8"},{"type":"WEB","url":"https://github.com/dlemstra/Magick.NET/commit/2dfa08e15cfd11016a79615994787b14f9048b1c"}],"affected":[{"package":{"name":"ImageMagick_jll","ecosystem":"Julia","purl":"pkg:julia/ImageMagick_jll?uuid=c73af94c-d91f-53ed-93a7-00f77d67a9d7"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"7.1.2023+0"}]}],"database_specific":{"source":"https://github.com/JuliaLang/SecurityAdvisories.jl/tree/generated/osv/2026/JLSEC-2026-929.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"}],"credits":[{"name":"Sumitshah00","contact":["https://github.com/Sumitshah00"],"type":"REPORTER"}]}