
Cloud Vulnerability DB
A community-led vulnerabilities database
ImageMagick versions lower than 14.8.2 contain a heap-based buffer overflow vulnerability (CVE-2025-57807) in the BlobStream functionality. The vulnerability affects the MagickCore/blob.c component, specifically in the SeekBlob() and WriteBlob() functions. The issue was discovered by Lumina Mescuwa and publicly disclosed on September 5, 2025. The vulnerability allows an attacker to perform heap out-of-bounds writes with attacker-controlled bytes at attacker-chosen offsets, potentially leading to memory corruption and code execution (GitHub Advisory).
The vulnerability stems from a contract mismatch between SeekBlob() and WriteBlob() functions. SeekBlob() permits advancing the stream offset beyond the current end without increasing capacity, while WriteBlob() expands by quantum + length instead of offset + length, and copies to data + offset. When offset is significantly larger than extent, the copy operation targets memory beyond the allocation, producing a deterministic heap write on 64-bit builds. The vulnerability can be demonstrated by initializing extent=1, writing one byte (offset=1), seeking to 0x10000000 (256 MiB), then writing 3-4 bytes. The CVSS v3.1 base score is 3.8 LOW (AV:L/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L) (GitHub Advisory, NVD).
The vulnerability has significant potential impacts on system security. It affects integrity through possible adjacent object/metadata overwrite, availability through reliable system crashes, and confidentiality as successful exploitation could lead to Remote Code Execution (RCE), allowing attackers to read all data accessible by the compromised process. The vulnerability is particularly concerning for server-side image processing scenarios where ImageMagick is commonly network-reachable (GitHub Advisory).
The vulnerability is fixed in ImageMagick version 14.8.2. The fix ensures that before copying length bytes at offset, the code enforces extent ≥ offset + length with overflow-checked arithmetic. For systems unable to update immediately, it's recommended to use file-backed streams instead of memory-backed blobs for operations requiring sparse behavior. The fix includes changes to WriteBlob() to implement proper capacity checks and reallocation strategies (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."