CVE-2026-62291 Memory corruption in libheif
A heap out-of-bounds write in libheif allows attackers to corrupt memory and potentially execute code via crafted image files.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-62291?
CVE-2026-62291 is a medium-severity memory corruption vulnerability in strukturag libheif, published on 18 Aug 2026. It can only be exploited from the same machine or local network, 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. In 1.23.0 and earlier, a crafted image sequence with a 2x2 primary plane and a 256x256 auxiliary alpha plane can cause attacker-controlled heap corruption during a normal decode and re-encode workflow. Track_Visual::decode_next_image_sample() calls transfer_channel_from_image_as() without checking that the auxiliary alpha dimensions match the main frame. The resulting inconsistent image reaches heif_track_decode_next_image() and then heif_context_encode_image(). In unc_encoder::encode(), unc_encoder_component_interleave::encode_tile() sizes its buffer with compute_tile_data_size_bytes() using the primary dimensions but copies each component using its actual plane dimensions. The oversized alpha plane is therefore copied beyond the allocation, causing an out-of-bounds write; the inverse size mismatch can also produce an out-of-bounds read. This issue is fixed in version 1.23.1.
Which versions are affected by CVE-2026-62291?
How do I fix CVE-2026-62291?
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-62291 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-62291 exists.
Sources
Also known as BELL-CVE-2026-62291, DEBIAN-CVE-2026-62291, ECHO-9d99-9ed1-60b7, GHSA-xpw3-9rhw-482x, MINI-p699-fc2q-h228, UBUNTU-CVE-2026-62291.