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

Published May 22, 2026
·
Updated

Last updated 19 June 2026

Other sources

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->getnumsamples() 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 currentchunk past chunks.size(), causing an out-of-bounds read on the chunks vector. The vulnerability is triggered during file parsing (heifcontextreadfromfile) 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.

MITRE

Affected Software

3 affected components
libheif libheif<=1.21.2
struktur Libheif<1.22.0
debian/libheif<=1.11.0-1, <=1.11.0-1+deb11u2, <=1.15.1-1+deb12u1, <=1.19.8-1, <=1.21.2-4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade libheif to a version that resolves this vulnerability.

    Fixed in 1.22.0
  2. Compensating control

    If you must process untrusted HEIF/AVIF files, restrict exposure by isolating the parsing/decoding process (e.g., run it in a sandbox/container) since the vulnerability is triggered during file parsing (heif_context_read_from_file) without additional user interaction.

Event History

May 22, 2026
CVE Published
via MITRE·08:59 PM
Data Sourced
via MITRE·08:59 PM
DescriptionWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeaknessAffected Software
Jun 18, 2026
Data Sourced
via Debian·06:48 PM
DescriptionAffected Software
Data Sourced
via Launchpad·06:48 PM
Description
Jun 19, 2026
Data Sourced
via Ubuntu·06:48 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-41071?

CVE-2026-41071 has a risk score of 43, indicating a significant vulnerability.

2

How do I fix CVE-2026-41071?

To mitigate CVE-2026-41071, update libheif to version 1.22.0 or later.

3

What type of vulnerability is CVE-2026-41071?

CVE-2026-41071 is classified as a heap buffer over-read vulnerability affecting libheif.

4

What causes CVE-2026-41071?

CVE-2026-41071 is triggered by a crafted HEIF sequence file with a mismatched saiz sample count.

5

In which versions of libheif is CVE-2026-41071 found?

CVE-2026-41071 affects libheif versions 1.21.2 and prior.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203