{"id":"CVE-2026-40310","aliases":["CVE-2026-40310","GHSA-pwg5-6jfc-crvh"],"related":[],"kind":"vulnerability","state":"published","title":"ImageMagick: Heap out-of-bounds write in JP2 encoder","summary":"ImageMagick is free and open-source software used for editing and manipulating digital images. Versions below both 7.1.2-19 and 6.9.13-44, contain a heap out-of-bounds write in the JP2 encoder with when a user specifies an invalid sampling index. This issue has been fixed in versions 6.9.13-44 and 7.1.2-19.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"ImageMagick is free and open-source software used for editing and manipulating digital images. Versions below both 7.1.2-19 and 6.9.13-44, contain a heap out-of-bounds write in the JP2 encoder with when a user specifies an invalid sampling index. This issue has been fixed in versions 6.9.13-44 and 7.1.2-19.","source":"cvelist"},{"lang":"en","text":"Heap out-of-bounds write in the JP2 encoder with when a user specifies an invalid sampling index.","format":"markdown","source":"ghsa"}],"published":"2026-04-13T21:32:53.361Z","modified":"2026-06-17T10:44:58.920Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-122","CWE-787"],"affected":[{"ranges":[{"version":"< 7.1.2-19","status":"affected"},{"version":"< 6.9.13-44","status":"affected"}],"vendor":"ImageMagick","product":"ImageMagick","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-AnyCPU","purl":"pkg:nuget/Magick.NET-Q16-AnyCPU","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-AnyCPU","purl":"pkg:nuget/Magick.NET-Q16-HDRI-AnyCPU","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-OpenMP-arm64","purl":"pkg:nuget/Magick.NET-Q16-HDRI-OpenMP-arm64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-x64","purl":"pkg:nuget/Magick.NET-Q16-HDRI-x64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-x86","purl":"pkg:nuget/Magick.NET-Q16-HDRI-x86","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-OpenMP-arm64","purl":"pkg:nuget/Magick.NET-Q16-OpenMP-arm64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-OpenMP-x64","purl":"pkg:nuget/Magick.NET-Q16-OpenMP-x64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-arm64","purl":"pkg:nuget/Magick.NET-Q16-arm64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-x64","purl":"pkg:nuget/Magick.NET-Q16-x64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-x86","purl":"pkg:nuget/Magick.NET-Q16-x86","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-AnyCPU","purl":"pkg:nuget/Magick.NET-Q8-AnyCPU","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-OpenMP-arm64","purl":"pkg:nuget/Magick.NET-Q8-OpenMP-arm64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-OpenMP-x64","purl":"pkg:nuget/Magick.NET-Q8-OpenMP-x64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-arm64","purl":"pkg:nuget/Magick.NET-Q8-arm64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-x64","purl":"pkg:nuget/Magick.NET-Q8-x64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.12.0"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-x86","purl":"pkg:nuget/Magick.NET-Q8-x86","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"6.9.13-44"},{"status":"affected","introduced":"7.0.0-0","fixed":"7.1.2-19"}],"vendor":"imagemagick","product":"imagemagick","cpe":"cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-pwg5-6jfc-crvh","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ImageMagick/ImageMagick/commit/3d653bea2df085c728a1c8f775808e1e9249dff9","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ImageMagick/ImageMagick/releases/tag/7.1.2-19","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/dlemstra/Magick.NET/releases/tag/14.12.0","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40310","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ImageMagick/ImageMagick","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-14T15:33:34.221Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40310","url":"https://www.cve.org/CVERecord?id=CVE-2026-40310","licence":"CVE Terms of Use","modified":"2026-04-14T16:28:25.315Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pwg5-6jfc-crvh","url":"https://github.com/advisories/GHSA-pwg5-6jfc-crvh","licence":"CC-BY-4.0","modified":"2026-04-21T07:56:18.745Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40310","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40310","licence":"Public domain","modified":"2026-06-17T10:44:58.920Z"}],"updatedAt":"2026-11-25T22:59:18.650Z","epss":{"score":0.00208,"percentile":0.06166,"date":"2026-11-30T12:00:22.000Z"}}