There are 4 places in HistogramCompare() in MagickCore/histogram.c where an integer overflow is possible during simple math calculations. This occurs in the rgb values and count value for a color. The patch uses casts to ssize_t type for these calculations, instead of int. This flaw could impact application reliability in the event that ImageMagick processes a crafted input file. This flaw affects ImageMagick versions prior to 7.0.9-0.
{
"license": "CC-BY-4.0",
"sources": [
{
"database_specific": {
"status": "Modified"
},
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2020-25666",
"modified": "2026-06-17T03:07:05.383Z",
"imported": "2026-07-30T14:08:42.232Z",
"id": "CVE-2020-25666",
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2020-25666",
"published": "2020-12-08T21:15:12.623Z"
}
]
}