CVE-2025-57803

NameCVE-2025-57803
DescriptionImageMagick 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 bytes_per_line (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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-4297-1, DSA-5997-1
Debian Bugs1112469

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
imagemagick (PTS)bullseye8:6.9.11.60+dfsg-1.3+deb11u4vulnerable
bullseye (security)8:6.9.11.60+dfsg-1.3+deb11u6fixed
bookworm8:6.9.11.60+dfsg-1.6+deb12u3vulnerable
bookworm (security)8:6.9.11.60+dfsg-1.6+deb12u4fixed
trixie8:7.1.1.43+dfsg1-1+deb13u1vulnerable
trixie (security)8:7.1.1.43+dfsg1-1+deb13u2fixed
forky, sid8:7.1.2.3+dfsg1-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
imagemagicksourcebullseye8:6.9.11.60+dfsg-1.3+deb11u6DLA-4297-1
imagemagicksourcebookworm8:6.9.11.60+dfsg-1.6+deb12u4DSA-5997-1
imagemagicksourcetrixie8:7.1.1.43+dfsg1-1+deb13u2DSA-5997-1
imagemagicksource(unstable)8:7.1.2.3+dfsg1-11112469

Notes

https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-mxvv-97wh-cfmm
https://github.com/ImageMagick/ImageMagick/commit/2c55221f4d38193adcb51056c14cf238fbcc35d7 (7.1.2-2)
https://github.com/ImageMagick/ImageMagick6/commit/e49c68c88eed6e68145480a471650daa9ed87217 (6.9.13-28)

Search for package or bug name: Reporting problems