6.1medium
libheif Has Heap Buffer Overflow in `Track::get_next_sample_raw_data()` -- OOB Chunk Vector Access
- Severity
- 6.1medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.19% (higher than 8% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
libheif is a HEIF and AVIF file format decoder and encoder. Prior to version 1.22.0, `Track::init_sample_timing_table()` in `libheif/sequences/track.cc` stores an out-of-bounds chunk index (`m_chunks.size()`) into `m_presentation_timeline` when the number of chunks defined in the `stco` box is less than the number of samples in `stsz`. A subsequent call to `heif_track_get_next_raw_sequence_sample()` reads `m_chunks[chunk_idx]` with that OOB index, causing a heap-buffer-overflow. Version 1.22.0 fixes the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| strukturag libheif | < 1.22.0 | CVE List |
| struktur libheif | before 1.22.0 | NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
libheif is a HEIF and AVIF file format decoder and encoder. Prior to version 1.22.0, `Track::init_sample_timing_table()` in `libheif/sequences/track.cc` stores an out-of-bounds chunk index (`m_chunks.size()`) into `m_presentation_timeline` when the number of chunks defined in the `stco` box is less than the number of samples in `stsz`. A subsequent call to `heif_track_get_next_raw_sequence_sample()` reads `m_chunks[chunk_idx]` with that OOB index, causing a heap-buffer-overflow. Version 1.22.0 fixes the issue.
NVD (es)
libheif es un decodificador y codificador de formato de archivo HEIF y AVIF. Antes de la versión 1.22.0, ’Track::init_sample_timing_table()’ en ’libheif/sequences/track.cc’ almacena un índice de fragmento fuera de límites (’m_chunks.size()’) en ’m_presentation_timeline’ cuando el número de fragmentos definido en la caja ’stco’ es menor que el número de muestras en ’stsz’. Una llamada posterior a ’heif_track_get_next_raw_sequence_sample()’ lee ’m_chunks[chunk_idx]’ con ese índice OOB, causando un desbordamiento de búfer de pila. La versión 1.22.0 corrige el problema.
References
| https://github.com/strukturag/libheif/security/advisories/GHSA-wqjg-4x9g-6cvg | exploit, mitigation, vendor-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-47254 changed 2026-07-22 | CVE Terms of Use |
| NVD | CVE-2026-47254 changed 2026-10-24 | Public domain |