ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 6.9.13-28 and 7.1.2-2 for ImageMagick's 32-bit build, a 32-bit integer overflow in the BMP encoder’s scanline-stride computation collapses bytesperline (stride) to a tiny value while the per-row writer still emits 3 × width bytes for 24-bpp images. The row base pointer advances using the (overflowed) stride, so the first row immediately writes past its slot and into adjacent heap memory with attacker-controlled bytes. This is a classic, powerful primitive for heap corruption in common auto-convert pipelines. This issue has been patched in versions 6.9.13-28 and 7.1.2-2.
{
"cwe_ids": [
"CWE-122",
"CWE-190"
]
}[
{
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "ReadBMPImage",
"file": "coders/bmp.c"
},
"source": "https://github.com/imagemagick/imagemagick/commit/2c55221f4d38193adcb51056c14cf238fbcc35d7",
"digest": {
"function_hash": "98450253896031567059744112484462267865",
"length": 27530.0
},
"signature_type": "Function",
"id": "CVE-2025-57803-89277af6"
},
{
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "coders/bmp.c"
},
"source": "https://github.com/imagemagick/imagemagick/commit/2c55221f4d38193adcb51056c14cf238fbcc35d7",
"digest": {
"line_hashes": [
"130122840548594026689022007878501028453",
"145056869145735077233493662158107480161",
"179200138282204920535003446424971061142",
"239937703154096417197519664186228797318",
"144067194380353516164858718298610586269",
"66267411906009294284087092204345024398",
"65646245964396069942832216175313157785",
"61566950132289248530273649997111542359",
"189151980642711680455156148012937237071",
"98008993413545604145418742435903622503",
"6438605313817107134997348937364540384",
"319979053344567485375356579138929755106",
"186830228046455146017301832995993992795",
"41645460235641068921657666722782829445",
"192265494488346284819098776536661163683",
"50846437415036683588716669708104666115"
],
"threshold": 0.9
},
"signature_type": "Line",
"id": "CVE-2025-57803-ac8b648b"
}
]