CVE-2026-32738CWE-125CWE-476

libheif has a Heap OOB Read/SEGV Crash via Zero samples_per_chunk

Medium · published May 19, 2026

CVSS v3.1
6.5
EPSS
0%
Percentile
30.2
In the wild
Unconfirmed
What it is

libheif is a HEIF and AVIF file format decoder and encoder. In versions 1.21.2 and below, a crafted 792-byte HEIF sequence file with samples_per_chunk=0 in the stsc box causes an unsigned integer underflow in the Chunk constructor (m_last_sample = 0 + 0 - 1 = UINT32_MAX), mapping all samples to an empty chunk and resulting in a denial of service. When any sample is accessed, the library reads from index 0 of an empty std::vector, causing a guaranteed SEGV (null-page read). The file parses successfully without producing an error; the crash occurs on the first frame access. This issue has been fixed in version 1.22.0.

The record
Technical detail
CVSS v3.1
6.5 · MEDIUM
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
CVSS v4.0
Not supplied
EPSS
0.00375 · 30.2th percentile
Weaknesses
CWE-125 · Out-of-bounds Read; CWE-476 · NULL Pointer Dereference
Published
2026-05-19T19:03Z
EPSS history
Timeline
  • 19 MAY 19:03Z
    libheif has a Heap OOB Read/SEGV Crash via Zero samples_per_chunk
    cvelistv5