libheif is a HEIF and AVIF file format decoder and encoder. Versions 1.21.2 and prior contain a heap-buffer-overflow (write) vulnerability in the grid tile compositing, allowing an attacker to write 64 bytes of fully attacker-controlled data past the end of a chroma plane heap allocation by crafting a HEIF/AVIF file with a 1×4 grid of odd-height tiles. The overflow is triggered during normal image decoding with default build configuration. The written bytes are chroma (Cb/Cr) pixel values from the attacking tile, giving the attacker full control over the overflow content. This issue has been fixed in version 1.22.0.
{
"cwe_ids": [
"CWE-787"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32740.json",
"cna_assigner": "GitHub_M"
}{
"cpe": "cpe:2.3:a:struktur:libheif:*:*:*:*:*:*:*:*",
"source": [
"AFFECTED_FIELD",
"CPE_RANGE",
"REFERENCES"
],
"extracted_events": [
{
"introduced": "0"
},
{
"fixed": "1.22.0"
}
]
}"2026-07-27T09:24:13Z"
[
{
"signature_type": "Line",
"target": {
"file": "tests/uncompressed_box.cc"
},
"deprecated": false,
"source": "https://github.com/strukturag/libheif/commit/0c81a846b7401dbdb7118afd0761057f21e43511",
"id": "CVE-2026-32740-91619f1d",
"signature_version": "v1",
"digest": {
"line_hashes": [
"175107675317900759648359576881034358256",
"220432159010798240840908416937024023837",
"268268967745545109707798594937166387611",
"253707932335489477155115861206639265538",
"199679408075604976163979654915891773303",
"175107675317900759648359576881034358256",
"220432159010798240840908416937024023837",
"268268967745545109707798594937166387611",
"286778284410146987248233194002847271266",
"178248309108630471590778685235254536836"
],
"threshold": 0.9
}
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-32740.json"