CVE-2026-32740

libheif: Heap-Buffer-Overflow Write in Grid Tile Chroma Compositing

Published May 19, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability is a heap-buffer-overflow that occurs during normal HEIF/AVIF decoding when a 1×4 grid of odd‑height tiles is processed. The fault writes 64 attacker‑controlled bytes past the end of a chroma plane allocation, enabling full control over the overwritten memory. Such overwrite can corrupt memory, crash the application, or possibly allow execution of arbitrary code if the overflow reaches executable code paths. The weakness is a classic example of CWE‑787, where data written outside the bounds of an allocated heap buffer occurs during regular library usage with default build configuration.

Affected Systems

The affected software is libheif from strukturag, the HEIF and AVIF encoder/decoder. All releases up to and including 1.21.2 are vulnerable; the problem was fixed in version 1.22.0. No other vendors or products are listed as impacted.

Risk and Exploitability

The CVSS score of 8.8 indicates high severity. EPSS data is unavailable, and the vulnerability is not listed in CISA’s KEV catalog. The flaw is exploitable by supplying a crafted HEIF/AVIF file that is processed by any application that uses libheif without safeguards. A prominent attack vector is remote delivery of a malicious image—via email, a web site, or any file‑import functionality—so the risk is high for any exposed service that decodes such files. The missing EPSS score does not diminish that the stack impact could be severe if the overflow reaches executable memory.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade libheif to version 1.22.0 or later, which includes the heap‑buffer‑overflow fix
  • If upgrade is not immediately possible, remove or disable features that enable grid tile compositing in the library (e.g., compile libheif with that option disabled) to prevent the overflow path
  • Where the library is used to decode untrusted HEIF/AVIF files, validate or sanitize the input beforehand, or use a sandboxed environment to limit the potential impact of a memory corruption event

Generated by OpenCVE AI on May 19, 2026 at 21:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-6417-1 libheif security update
Ubuntu USN Ubuntu USN USN-8454-1 libheif vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
CPEs cpe:2.3:a:struktur:libheif:*:*:*:*:*:*:*:*
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Struktur
Struktur libheif
Vendors & Products Struktur
Struktur libheif
Type Values Removed Values Added
Description 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.
Title libheif: Heap-Buffer-Overflow Write in Grid Tile Chroma Compositing
Weaknesses CWE-787
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 15, 2026, 1:07 AM
Reserved
Mar 13, 2026, 3:02 PM
Status
Modified
Published
May 19, 2026, 8:16 PM
Modified
Jul 24, 2026, 9:10 AM
Severity
Important
Public date
May 19, 2026, 7:22 PM