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 = 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.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32738.json",
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-125",
"CWE-476"
]
}{
"cpe": "cpe:2.3:a:struktur:libheif:*:*:*:*:*:*:*:*",
"source": [
"AFFECTED_FIELD",
"CPE_RANGE"
],
"extracted_events": [
{
"introduced": "0"
},
{
"fixed": "1.22.0"
}
]
}[
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"175107675317900759648359576881034358256",
"220432159010798240840908416937024023837",
"268268967745545109707798594937166387611",
"253707932335489477155115861206639265538",
"199679408075604976163979654915891773303",
"175107675317900759648359576881034358256",
"220432159010798240840908416937024023837",
"268268967745545109707798594937166387611",
"286778284410146987248233194002847271266",
"178248309108630471590778685235254536836"
]
},
"signature_version": "v1",
"source": "https://github.com/strukturag/libheif/commit/0c81a846b7401dbdb7118afd0761057f21e43511",
"signature_type": "Line",
"target": {
"file": "tests/uncompressed_box.cc"
},
"id": "CVE-2026-32738-91619f1d",
"deprecated": false
}
]
"2026-07-15T19:00:07Z"
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-32738.json"