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.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40310.json",
"unresolved_ranges": [
{
"extracted_events": [
{
"fixed": "6.9.13-44"
}
],
"source": "AFFECTED_FIELD"
}
],
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-122",
"CWE-787"
]
}{
"cpe": "cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*",
"extracted_events": [
{
"introduced": "7.0.0-0"
},
{
"fixed": "7.1.2-19"
}
],
"source": [
"CPE_FIELD",
"REFERENCES"
]
}{
"source": "CPE_FIELD",
"extracted_events": [
{
"introduced": "0"
},
{
"fixed": "6.9.13-44"
}
],
"cpe": "cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*"
}