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

Published May 19, 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 below, a crafted 792-byte HEIF sequence file with samplesperchunk=0 in the stsc box causes an unsigned integer underflow in the Chunk constructor (mlastsample = 0 + 0 - 1 = UINT32MAX), 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.

NVD

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

Event History

May 19, 2026
CVE Published
via MITRE·07:03 PM
Data Sourced
via MITRE·07:03 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07: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-32738?

CVE-2026-32738 has a high severity rating due to the potential for a heap out-of-bounds read and subsequent crash.

2

How do I fix CVE-2026-32738?

To fix CVE-2026-32738, upgrade to libheif version 1.21.3 or later, which addresses the vulnerability.

3

What versions of libheif are affected by CVE-2026-32738?

CVE-2026-32738 affects libheif versions up to and including 1.21.2.

4

What kind of attack can exploit CVE-2026-32738?

An attacker can exploit CVE-2026-32738 by providing a crafted HEIF file that triggers the vulnerability.

5

Is CVE-2026-32738 specific to a certain file format?

Yes, CVE-2026-32738 specifically affects the HEIF and AVIF file formats processed by libheif.

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