CVE-2026-49271 libheif: Wrapped icef compressed-unit range check causes out-of-bounds read in uncompressed HEIF decoder

Medium 6.5 Published Updated

A crafted HEIF file triggers an integer overflow in libheif, causing an out-of-bounds read and application crash.

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-49271?

CVE-2026-49271 is a medium-severity vulnerability in strukturag libheif, published on 19 Jun 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. Prior to version 1.22.1, the uncompressed HEIF decoder validates explicit icef compressed-unit offsets using unit_offset + unit_size. Because the addition can wrap, a crafted HEIF file can pass the range check and then construct a vector from iterators outside the compressed item buffer, producing an out-of-bounds heap read and crash. Version 1.22.1 patches the issue.

Weakness: CWE-125

Which versions are affected by CVE-2026-49271?

It affects 1 product.

Products include Struktur Libheif.

How do I fix CVE-2026-49271?

Upgrade to a fixed version.

Is CVE-2026-49271 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49271 exists.

Sources

Also known as BELL-CVE-2026-49271, DEBIAN-CVE-2026-49271, ECHO-77c2-91a0-4936, GHSA-r7qj-cg5r-r6vf, JLSEC-2026-1101, MINI-fvjp-p586-mvf2 and 1 more.

Is CVE-2026-49271 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free