CVE-2026-32814: libheif: Uninitialized Heap Memory Information Leak via Failed Grid Tiles
Last updated 19 June 2026
Other sources
libheif is a HEIF and AVIF file format decoder and encoder. In versions 1.21.2 and prior, when decoding a HEIF grid image with strictdecoding=false (the default), a corrupted tile silently fails to decode and the library returns heiferrorOk with no indication of failure, leading to an uninitialized heap memory information leak. The canvas is allocated via createcloneimageatnewsize() → plane.alloc() → new (std::nothrow) uint8t[allocationsize] which does not zero the memory; only the alpha plane is explicitly initialized via fillplane(), so the Y, Cb, and Cr planes contain whatever was previously at that heap address. The failed tile's region of the canvas is never written. It retains uninitialized heap data that is delivered to the caller as decoded pixel values (4,096 bytes per Y/Cb/Cr plane = 12,288+ bytes total). Any application using libheif to decode grid-based HEIF/AVIF files with default settings is vulnerable: a crafted .heic or .avif file causes 4,096+ bytes of heap memory to appear as pixel values in the decoded image, and the calling application receives heiferrorOk, so it has no indication the output contains heap garbage. In server-side image processing, an uploaded crafted HEIF decoded and re-encoded (e.g., as PNG/JPEG for thumbnails, CDN, social media) can leak cross-user data such as auth tokens, database results, and other users' image data. This issue has been fixed in version 1.22.0.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
libheifto a version that resolves this vulnerability.Fixed in 1.22.0 - Configuration
When decoding HEIF grid images, set strict_decoding=true (the issue applies to versions 1.21.2 and prior with strict_decoding=false, the default) so corrupted tiles do not silently fail while returning heif_error_Ok.
libheif strict_decoding = true - Compensating control
In server-side image processing, isolate image decoding/re-encoding jobs (for example, run in a sandbox/container with no access to auth tokens, database credentials, or other users’ data) to reduce cross-user data leakage impact when crafted HEIF/AVIF files are processed.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-32814?
CVE-2026-32814 has a medium severity rating of 6.5.
How do I fix CVE-2026-32814?
To fix CVE-2026-32814, upgrade libheif to version 1.22.0 or later.
What is the impact of CVE-2026-32814?
CVE-2026-32814 can lead to an information leak due to uninitialized heap memory when decoding certain HEIF grid images.
Which versions of libheif are affected by CVE-2026-32814?
libheif versions 1.21.2 and prior are affected by CVE-2026-32814.
What conditions trigger the CVE-2026-32814 vulnerability?
CVE-2026-32814 is triggered when decoding a HEIF grid image with strict_decoding set to false and encountering a corrupted tile.