CVE-2026-32740: libheif: Heap-Buffer-Overflow Write in Grid Tile Chroma Compositing
Last updated 19 June 2026
Other sources
libheif is a HEIF and AVIF file format decoder and encoder. Versions 1.21.2 and prior contain a heap-buffer-overflow (write) vulnerability in the grid tile compositing, allowing an attacker to write 64 bytes of fully attacker-controlled data past the end of a chroma plane heap allocation by crafting a HEIF/AVIF file with a 1×4 grid of odd-height tiles. The overflow is triggered during normal image decoding with default build configuration. The written bytes are chroma (Cb/Cr) pixel values from the attacking tile, giving the attacker full control over the overflow content. 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
Event History
Frequently Asked Questions
What is the severity of CVE-2026-32740?
CVE-2026-32740 has a critical severity due to the potential for remote code execution as a result of the heap-buffer-overflow vulnerability.
How do I fix CVE-2026-32740?
To fix CVE-2026-32740, update libheif to version 1.22.0 or later to eliminate the vulnerability.
What products are affected by CVE-2026-32740?
CVE-2026-32740 affects libheif versions up to and including 1.21.2.
What type of vulnerability is CVE-2026-32740?
CVE-2026-32740 is classified as a heap buffer overflow vulnerability.
Can CVE-2026-32740 be exploited remotely?
Yes, an attacker can exploit CVE-2026-32740 remotely by crafting specific inputs that trigger the vulnerability.