# CVE-2026-41071: libheif: Heap buffer over-read in SampleAuxInfoReader via crafted HEIF sequence file with mismatched saiz sample count

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

## Description

```text
libheif is a HEIF and AVIF file format decoder and encoder. In versions 1.21.2 and prior, a crafted HEIF sequence file where the saiz box declares more samples than actually exist in the track's chunk table causes a heap-buffer-overflow (out-of-bounds read) in the SampleAuxInfoReader constructor. The SampleAuxInfoReader constructor iterates over saiz->get_num_samples() samples but doesn't validate that this count is consistent with the number of chunks in the chunks vector. When saiz declares more samples than the chunks cover, the loop increments current_chunk past chunks.size(), causing an out-of-bounds read on the chunks vector. The vulnerability is triggered during file parsing (heif_context_read_from_file) without any additional user interaction. Any application using libheif to open untrusted HEIF files is affected. This issue has been fixed in version 1.22.0.
```

## Signals

- CVSS: 8.1 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
- EPSS: 0.302%, percentile 24.609%, 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

- 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-xj92-xjff-h8w3>
- <https://github.com/strukturag/libheif/releases/tag/v1.22.0>
- <https://ubuntu.com/security/CVE-2026-41071>
- <https://www.cve.org/CVERecord?id=CVE-2026-41071>
- <https://ubuntu.com/security/notices/USN-8454-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-41071>

---

Data as of 2026-12-05T09:59:50.041Z. 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
