CVE-2026-32740
Analyzed Analyzed - Analysis Complete
Heap Buffer Overflow in libheif Image Decoder

Publication date: 2026-05-19

Last updated on: 2026-05-20

Assigner: GitHub, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-19
Last Modified
2026-05-20
Generated
2026-05-20
AI Q&A
2026-05-19
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
struktur libheif to 1.22.0 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-787 The product writes data past the end, or before the beginning, of the intended buffer.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a heap-buffer-overflow in the libheif library, which is used for decoding and encoding HEIF and AVIF image files. It occurs in the grid tile compositing feature when decoding specially crafted HEIF/AVIF files that contain a 1Γ—4 grid of tiles with odd heights. Due to a rounding error in calculating chroma plane offsets and copy height, the software writes 64 bytes of attacker-controlled data beyond the allocated memory buffer for chroma pixels. This overflow happens during normal image decoding and allows an attacker to overwrite adjacent memory, potentially corrupting important data structures.


How can this vulnerability impact me? :

This vulnerability can have severe impacts including remote code execution, denial of service, and data corruption. An attacker can craft a malicious image file that, when decoded, causes the overflow to overwrite adjacent heap objects such as vtable pointers or allocator metadata. This can lead to execution of arbitrary code with the privileges of the application processing the image. It can also crash the application, causing denial of service. The attacker can precisely control the overflow to target specific memory areas, increasing the risk and impact.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability is triggered during normal image decoding of crafted HEIF/AVIF files with a specific 1Γ—4 grid of odd-height tiles. Detection involves identifying attempts to process such maliciously crafted image files.

Since the vulnerability arises from heap-buffer-overflow during decoding, monitoring for crashes or AddressSanitizer aborts in applications using libheif (versions up to 1.21.2) can indicate exploitation attempts.

No explicit detection commands are provided in the resources. However, you can check the libheif version installed on your system to identify if it is vulnerable:

  • Run `heif-convert --version` or check the package version via your package manager (e.g., `dpkg -l | grep libheif` on Debian-based systems or `rpm -q libheif` on RedHat-based systems).

Additionally, monitoring logs for crashes or unusual behavior in image processing applications that use libheif may help detect exploitation attempts.


What immediate steps should I take to mitigate this vulnerability?

The primary mitigation step is to upgrade libheif to version 1.22.0 or later, where this heap-buffer-overflow vulnerability has been fixed.

Until the upgrade can be applied, avoid processing untrusted or suspicious HEIF/AVIF files, especially those that might contain a 1Γ—4 grid of odd-height tiles.

Consider running image decoding processes with security mitigations such as sandboxing or using AddressSanitizer builds to detect and prevent exploitation.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability in libheif allows an attacker to execute remote code or cause denial of service by exploiting a heap-buffer-overflow during image decoding. This can lead to unauthorized access, modification, or disruption of data handled by applications using libheif.

Such security issues can impact compliance with standards and regulations like GDPR and HIPAA, which require protection of data confidentiality, integrity, and availability. If exploited, this vulnerability could result in data breaches or service interruptions, potentially violating these regulatory requirements.

Therefore, organizations using vulnerable versions of libheif should update to version 1.22.0 or later to mitigate risks and maintain compliance with relevant security standards.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart