Vulnerability · Published Apr 13, 2026 · Assigned by GitHub_M
CVE-2026-40310ImageMagick: Heap out-of-bounds write in JP2 encoder
Medium 5.5
In plain English
A medium-severity heap buffer overflow in ImageMagick from ImageMagick. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.23 | imagemagick | 7.1.2.19-r0 | ALPINE-CVE-2026-40310 |
| Alpine:v3.24 | imagemagick | 7.1.2.19-r0 | ALPINE-CVE-2026-40310 |
| Debian:12 | imagemagick | 8:6.9.11.60+dfsg-1.6+deb12u9 | DEBIAN-CVE-2026-40310 |
| Debian:13 | imagemagick | 8:7.1.1.43+dfsg1-1+deb13u8 | DEBIAN-CVE-2026-40310 |
| Debian:14 | imagemagick | 8:7.1.2.19+dfsg1-1 | DEBIAN-CVE-2026-40310 |
| NuGet | magick.net-q16-anycpu | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q16-arm64 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q16-hdri-anycpu | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q16-hdri-openmp-arm64 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q16-hdri-x64 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q16-hdri-x86 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q16-openmp-arm64 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q16-openmp-x64 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q16-x64 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q16-x86 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q8-anycpu | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q8-arm64 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q8-openmp-arm64 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q8-openmp-x64 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q8-x64 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| NuGet | magick.net-q8-x86 | 14.12.0 | GHSA-pwg5-6jfc-crvh |
| Ubuntu:25.10 | imagemagick | no fix listed | UBUNTU-CVE-2026-40310 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| ImageMagick | ImageMagick | < 7.1.2-19< 6.9.13-44 |
Weakness: CWE-122, CWE-787 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
References
- https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-pwg5-6jfc-crvh x_refsource_CONFIRM
- https://github.com/ImageMagick/ImageMagick/commit/3d653bea2df085c728a1c8f775808e1e9249dff9 x_refsource_MISC
- https://github.com/ImageMagick/ImageMagick/releases/tag/7.1.2-19 x_refsource_MISC
- https://github.com/dlemstra/Magick.NET/releases/tag/14.12.0 x_refsource_MISC