Heap Buffer Overflow in libheif Affects Video File Processing
CVE-2026-47254
6.1MEDIUM
What is CVE-2026-47254?
The libheif library, a decoder and encoder for HEIF and AVIF file formats, contains a vulnerability prior to version 1.22.0. In the function Track::init_sample_timing_table(), an erroneous index is stored in m_presentation_timeline when the chunk count in the stco box is less than the sample count in stsz, leading to an out-of-bounds condition. This can result in a heap buffer overflow when heif_track_get_next_raw_sequence_sample() attempts to access the out-of-bounds index, potentially allowing attackers to exploit this flaw for malicious purposes. The issue is resolved in version 1.22.0.
Affected Version(s)
libheif < 1.22.0
