Red Hat VEX
RHVEX-CVE-2025-57807
imagemagick: ImageMagick BlobStream Forward-Seek Under-Allocation
Details
A heap based out of bounds write flaw has been discovered in ImageMagick. For memory-backed blobs SeekBlob() permits advancing the stream offset beyond the current end without increasing capacity. The subsequent WriteBlob() then expands by quantum + length (amortized) instead of offset + length, and copies to data + offset. When offset ≫ extent, the copy targets memory beyond the allocation, producing a deterministic heap write on 64-bit builds.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Red Hat:enterprise_linux:6 | ImageMagick | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:6 | ImageMagick-c++ | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:6 | ImageMagick-c++-devel | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:6 | ImageMagick-devel | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:6 | ImageMagick-doc | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:6 | ImageMagick-perl | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | ImageMagick | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | ImageMagick-c++ | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | ImageMagick-c++-devel | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | ImageMagick-devel | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | ImageMagick-doc | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | ImageMagick-perl | All versions, no fix (out of support scope) |
References
- https://access.redhat.com/security/cve/CVE-2025-57807
- https://bugzilla.redhat.com/show_bug.cgi?id=2393590
- https://www.cve.org/CVERecord?id=CVE-2025-57807
- https://nvd.nist.gov/vuln/detail/CVE-2025-57807
- https://github.com/ImageMagick/ImageMagick/commit/077a417a19a5ea8c85559b602754a5b928eef23e
- https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-23hg-53q6-hqfg