Heap Buffer Overflow in libheif HEIF and AVIF File Format Decoder by Struktur AG
CVE-2026-32741
7.1HIGH
What is CVE-2026-32741?
The libheif library, responsible for decoding HEIF and AVIF file formats, is vulnerable to a heap buffer overflow. This vulnerability arises from a flaw in the MaskImageCodec::decode_mask_image() function, specifically when decoding a HEIF file containing a mask image. The function improperly copies the full extent of data into a pixel buffer using memcpy without verifying the size, allowing attackers to create crafted files that exceed buffer allocations, leading to potential exploit scenarios. Versions prior to 1.22.0 are affected, and users are advised to upgrade to mitigate this risk.
Affected Version(s)
libheif < 1.22.0
