CVE-2026-40310
MEDIUM5.5EPSS 0.01%ImageMagick has a heap out-of-bounds write in JP2 encoder
Published: 4/14/2026Modified: 5/17/2026
Description
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.
Affected packages (17)
- Debian/imagemagickfrom 0, < 8:6.9.11.60+dfsg-1.3+deb11u12
- NuGet/Magick.NET-Q16-AnyCPUfrom 0, < 14.12.0
- NuGet/Magick.NET-Q16-arm64from 0, < 14.12.0
- NuGet/Magick.NET-Q16-HDRI-AnyCPUfrom 0, < 14.12.0
- NuGet/Magick.NET-Q16-HDRI-OpenMP-arm64from 0, < 14.12.0
- NuGet/Magick.NET-Q16-HDRI-x64from 0, < 14.12.0
- NuGet/Magick.NET-Q16-HDRI-x86from 0, < 14.12.0
- NuGet/Magick.NET-Q16-OpenMP-arm64from 0, < 14.12.0
- NuGet/Magick.NET-Q16-OpenMP-x64from 0, < 14.12.0
- NuGet/Magick.NET-Q16-x64from 0, < 14.12.0
- NuGet/Magick.NET-Q16-x86from 0, < 14.12.0
- NuGet/Magick.NET-Q8-AnyCPUfrom 0, < 14.12.0
- NuGet/Magick.NET-Q8-arm64from 0, < 14.12.0
- NuGet/Magick.NET-Q8-OpenMP-arm64from 0, < 14.12.0
- NuGet/Magick.NET-Q8-OpenMP-x64from 0, < 14.12.0
- NuGet/Magick.NET-Q8-x64from 0, < 14.12.0
- NuGet/Magick.NET-Q8-x86from 0, < 14.12.0
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | MEDIUM5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
References (7)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2026-40310
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2026-40310
- PATCHhttps://github.com/ImageMagick/ImageMagick
- WEBhttps://github.com/dlemstra/Magick.NET/releases/tag/14.12.0
- WEBhttps://github.com/ImageMagick/ImageMagick/commit/3d653bea2df085c728a1c8f775808e1e9249dff9
- WEBhttps://github.com/ImageMagick/ImageMagick/releases/tag/7.1.2-19
- WEBhttps://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-pwg5-6jfc-crvh