Skip to main content

Heap-based Buffer Overflow

CVE-2025-57807

Severity High
Score 9.8/10

Summary

ImageMagick is free and open-source software used for editing and manipulating digital images. ImageMagick Nuget versions prior to 14.8.2 and CPP versions prior to 6.9.13-29 and 7.1.2-3 include insecure functions: "SeekBlob()", which permits advancing the stream offset beyond the current end without increasing capacity, and "WriteBlob()", which 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. No 2 arithmetic wrap, external delegates, or policy settings are required.

  • LOW
  • NETWORK
  • HIGH
  • UNCHANGED
  • NONE
  • NONE
  • HIGH
  • HIGH

CWE-122 - Heap-based Buffer Overflow

A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().

References

Advisory Timeline

  • Published