CVE-2026-41071

Name
CVE-2026-41071
Description
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.
NVD Severity
unknown
Other trackers
Mailing lists
Exploits
Forges
GitHub (code, issues), Aports (code, issues)

References

Type URI
security-advisories@github.com https://github.com/strukturag/libheif/releases/tag/v1.22.0
security-advisories@github.com https://github.com/strukturag/libheif/security/advisories/GHSA-xj92-xjff-h8w3

Match rules

CPE URI Source package Min version Max version
cpe:2.3:a:struktur:libheif:*:*:*:*:*:*:*:* libheif >= None < 1.22.0

Vulnerable and fixed packages

Source package Branch Version Maintainer Status
libheif edge-main 1.21.2-r0 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-main 1.20.2-r2 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-main 1.20.2-r1 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-main 1.17.6-r0 None possibly vulnerable
libheif edge-main 1.5.0-r0 None possibly vulnerable
libheif edge-community 1.21.2-r3 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-community 1.21.2-r2 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-community 1.21.2-r1 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-community 1.21.2-r0 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-community 1.20.2-r1 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-community 1.20.2-r0 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-community 1.20.1-r0 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-community 1.19.8-r0 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-community 1.19.7-r0 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-community 1.19.5-r0 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-community 1.17.6-r0 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif edge-community 1.5.0-r0 None possibly vulnerable
libheif 3.23-main 1.21.2-r0 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable
libheif 3.23-main 1.20.2-r1 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable