# CVE-2026-32738: libheif has a Heap OOB Read/SEGV Crash via Zero samples\_per\_chunk

- Priority: **Routine**
- Reason: Not severe (CVSS 6.5, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-05-19 · Modified: 2026-05-19
- Aliases: ALPINE-CVE-2026-32738, UBUNTU-CVE-2026-32738, DEBIAN-CVE-2026-32738
- Record: https://cvemate.com/vulnerability/CVE-2026-32738 · JSON: https://cvemate.com/vulnerability/CVE-2026-32738/json

## Description

```text
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.
```

## Signals

- CVSS: 6.5 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- EPSS: 0.301%, percentile 24.603%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- alpine libheif (Alpine Linux): \< 1.23.0-r0 \| \< 1.22.2-r0
- debian libheif (Debian): All versions (No fix recorded) \| \< 1.23.1-1
- ubuntu libheif (Ubuntu): \< 1.20.2-1ubuntu0.4 \| \< 1.21.2-3ubuntu0.1
- struktur libheif: \< 1.22.0
- strukturag libheif: \< 1.22.0

## References

- <https://github.com/strukturag/libheif/security/advisories/GHSA-7f2h-cmpf-v9ww>
- <https://security.alpinelinux.org/vuln/CVE-2026-32738>
- <https://ubuntu.com/security/CVE-2026-32738>
- <https://www.cve.org/CVERecord?id=CVE-2026-32738>
- <https://ubuntu.com/security/notices/USN-8454-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-32738>

---

Data as of 2026-12-05T09:59:48.472Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
