CVE-2026-32738 Details
Description
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.
A denial-of-service vulnerability has been identified in libheif, a library for decoding and encoding HEIF and AVIF file formats. This issue affects versions through 1.21.2. The vulnerability arises when a specially crafted 792-byte HEIF sequence file is processed. The file contains a 'samples_per_chunk' value of 0 in the 'stsc' box, which leads to an unsigned integer underflow in the Chunk constructor. This underflow maps all samples to an empty chunk. When any sample is accessed, the library attempts to read from the first index of an empty vector, resulting in a segmentation fault due to a null-page read. The file is parsed successfully without errors, and the crash occurs upon the first frame access, making this a reliable denial-of-service vector.
Users should update to libheif version 1.22.0 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 19, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/strukturag/libheif/security/advisories/GHSA-7f2h-cmpf-v9ww | CISA-ADP | ExploitVendor Advisory |
| https://github.com/strukturag/libheif/security/advisories/GHSA-7f2h-cmpf-v9ww | [email protected] | ExploitVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-125 | Out-of-bounds Read | [email protected] |
| CWE-476 | NULL Pointer Dereference | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| struktur libheif | < 1.22.0 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 20, 2026 | Initial Analysis | [email protected] |
| May 19, 2026 | CVE Modified | CISA-ADP |
| May 19, 2026 | New CVE Received | [email protected] |