CVE-2025-57807: ImageMagick BlobStream Forward-Seek Under-Allocation
For memory-backed blobs (BlobStream), 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. No 2⁶⁴ arithmetic wrap, external delegates, or policy settings are required.
References
Code Behaviors & Features
Detect and mitigate CVE-2025-57807 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →