CVE-2026-32740 libheif: Heap-Buffer-Overflow Write in Grid Tile Chroma Compositing
An attacker can execute arbitrary code or cause a denial of service by crafting a malicious HEIF/AVIF file that triggers a heap buffer overflow in libheif.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-32740?
CVE-2026-32740 is a high-severity memory corruption vulnerability in strukturag libheif, published on 19 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-787
Which versions are affected by CVE-2026-32740?
It affects 1 product.
Products include Struktur Libheif.
How do I fix CVE-2026-32740?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-32740 being exploited?
There is no known exploitation of CVE-2026-32740 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in strukturag libheif
Sources
Also known as ALPINE-CVE-2026-32740, BELL-CVE-2026-32740, DEBIAN-CVE-2026-32740, ECHO-dba8-54f3-0eb4, GHSA-frfr-f3vg-2g6j, JLSEC-2026-572 and 3 more.