CVE-2026-40310: imagemagick Heap-based Buffer Overflow
CVSS: 5.5v3.1MediumAnalyzed
AliasesUBUNTU-CVE-2026-40310DEBIAN-CVE-2026-40310GHSA-pwg5-6jfc-crvh
Published 13-04-2026Last modified 14-04-2026
Vulnerability summary
CVE-2026-40310 is a medium (CVSS 5.5) Heap-based Buffer Overflow vulnerability in imagemagick. EPSS estimates a 0.19% chance of exploitation in the next 30 days, higher than 8% of scored vulnerabilities.
CVSS score
5.5/10
010
Medium · v3.1 (CVE.org)EPSS score
0.19%
0%100%
Low · 0.00 pp in 30 daysKEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded
Advisory lineage
Upstream 0 · Downstream 6 · Related 6Timeline
- 13-04-2026PublishedVulnerability first disclosed.
- 14-04-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
5 scores · 5 sources · 1 versionMedium 5.5Preferred score · CVE.org (CNA)
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:HSourcesAll 5 agree
- OSV · UbuntuEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- OSV · NugetEcosystem advisory · calculated5.5MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- NVDNIST5.5MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.19%
Chance of exploitation in the next 30 days
Percentile
8%
Versus all other CVEs
30-day change
0.00 pp
From 0.19% on 19-09-2026
19-09-202619-10-2026
EPSS score0.19%
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-122Heap-based Buffer OverflowA heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
- CWE-787Out-of-bounds WriteThe product writes data past the end, or before the beginning, of the intended buffer.
Affected systems
NuGet16 products
- magick.net-q16-anycpu< 14.12.0
- Magick.NET-Q16-arm64< 14.12.0
- magick.net-q16-hdri-anycpu< 14.12.0
- Magick.NET-Q16-HDRI-OpenMP-arm64< 14.12.0
- Magick.NET-Q16-HDRI-x64< 14.12.0
Debian1 product
- imagemagick< 8:6.9.11.60+dfsg-1.6+deb12u9 | < 8:7.1.1.43+dfsg1-1+deb13u8 | < 8:7.1.2.19+dfsg1-1
Imagemagick1 product
- imagemagick< 7.1.2-19 | < 6.9.13-44 | ≥ 7.0.0-0, < 7.1.2-19
Ubuntu1 product
- imagemagick< 8:6.8.9.9-7ubuntu5.16+esm25 | < 8:6.9.7.4+dfsg-16ubuntu6.15+esm17 | < 8:6.9.10.23+dfsg-2.1ubuntu11.11+esm15 | < 8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5+esm15 | < 8:6.9.12.98+dfsg1-5.2ubuntu0.1~esm14 | All versions (No fix recorded) | < 8:7.1.2.18+dfsg1-1ubuntu0.1~esm3
4 vendors · 19 products
References
11 links- github.com/ImageMagick/ImageMagick/security/advisories/GHSA-pwg5-6jfc-crvhX Refsource CONFIRMREPORTWEBVendor Advisory
- github.com/ImageMagick/ImageMagick/commit/3d653bea2df085c728a1c8f775808e1e9249dff9X Refsource MISCREPORTWEBPatch