
CVE-2026-50142 — Heap allocation vulnerability in libheif HEIF sequence parser
Unbounded heap allocation in HEIF sequence parser (stsz fixed-size mode)
A 1,477-byte crafted HEIF file triggers ~7 GB unchecked heap allocation
in Chunk::Chunk() via missing max_sequence_frames check in
Box_stsz::parse() fixed-size mode.
seq_boxes.cc:1067 — m_sample_count stored verbatim (no bound check)
when m_fixed_sample_size != 0.
Move max_sequence_frames check outside if (m_fixed_sample_size == 0) branch.