# CVE-2026-32738: libheif has a Heap OOB Read/SEGV Crash via Zero samples_per_chunk

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.30%, higher than 24% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-19T19:03:48.553Z
- Modified: 2026-07-24T09:10:00.153Z
- Weaknesses: CWE-125, CWE-476
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- strukturag libheif: < 1.22.0
- struktur libheif: before 1.22.0

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`

## References

- <https://github.com/strukturag/libheif/security/advisories/GHSA-7f2h-cmpf-v9ww> (exploit, vendor-advisory)

## Sources

- CVE List: [CVE-2026-32738](https://www.cve.org/CVERecord?id=CVE-2026-32738), CVE Terms of Use, modified 2026-05-19
- NVD: [CVE-2026-32738](https://nvd.nist.gov/vuln/detail/CVE-2026-32738), Public domain, modified 2026-07-24

---

Page: https://cve.day/CVE-2026-32738 · Whole record: https://cve.day/CVE-2026-32738.json · Rebuilt by cve.day 2026-11-25T22:59:21.992Z
