Executive brief
libvips is an open-source image processing library used in many applications to convert, resize, and manipulate images efficiently. A vulnerability in how it processes crafted TIFF image files with many bands can cause an integer overflow, leading to unauthorized access to image data in memory, potential data disclosure, or application crashes. Remote code execution risk cannot be completely ruled out.
Technical details
An integer overflow vulnerability exists in libvips' VipsForeignLoadTiff function when processing many-band TIFF files. The vulnerability is rooted in insufficient scanline validation in libvips/iofuncs/image.c, specifically in the vips_image_sanity function, where scanline calculations can overflow an int. This overflow leads to incorrect buffer-region calculations that allow reads and writes to negative offsets in mmap-resident memory allocations. An attacker can craft a malicious TIFF file and supply it to an application using libvips; exploitation requires the application to process the file through the TIFF loader. The impact includes unauthorized access to adjacent image data in memory (data disclosure via uncompressed .v output) and process crashes; RCE has not been demonstrated but cannot be excluded. The fix, available in version 8.18.3, adds validation to ensure scanlines fit within INT_MAX bounds.
Affected products
- libvips libvips before 8.18.3
Timeline
- 2026-08-20: disclosed
- 2026-04-26: patched