CVE-2026-32740: CWE-787: Out-of-bounds Write in strukturag libheif
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.
AI Analysis
Technical Summary
CVE-2026-32740 is a heap-buffer-overflow (CWE-787) vulnerability in the strukturag libheif library, affecting versions prior to 1.22.0. The flaw occurs during the decoding of HEIF/AVIF files that contain a 1×4 grid of odd-height tiles, where the grid tile compositing logic writes 64 bytes beyond the allocated chroma plane buffer. The overflowed data consists of chroma pixel values controlled by the attacker, enabling full control over the overflow content. This vulnerability is triggered during normal image decoding with the default build configuration. The issue has been addressed and fixed in libheif version 1.22.0. The CVSS v3.1 base score is 8.8, indicating high severity with network attack vector, low attack complexity, no privileges required, user interaction required, and high impact on confidentiality, integrity, and availability.
Potential Impact
Successful exploitation allows an attacker to write 64 bytes of attacker-controlled data beyond the allocated heap buffer for chroma pixels during image decoding. This can lead to memory corruption, potentially resulting in arbitrary code execution, denial of service, or other impacts depending on the context in which libheif is used.
Mitigation Recommendations
A fix is available in libheif version 1.22.0. Users and vendors should upgrade to version 1.22.0 or later to remediate this vulnerability. No additional mitigations are indicated by the vendor advisory.
CVE-2026-32740: CWE-787: Out-of-bounds Write in strukturag libheif
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 v3.1
Score 8.8high
Affected software
pkg:github/strukturag/libheifRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-32740 is a heap-buffer-overflow (CWE-787) vulnerability in the strukturag libheif library, affecting versions prior to 1.22.0. The flaw occurs during the decoding of HEIF/AVIF files that contain a 1×4 grid of odd-height tiles, where the grid tile compositing logic writes 64 bytes beyond the allocated chroma plane buffer. The overflowed data consists of chroma pixel values controlled by the attacker, enabling full control over the overflow content. This vulnerability is triggered during normal image decoding with the default build configuration. The issue has been addressed and fixed in libheif version 1.22.0. The CVSS v3.1 base score is 8.8, indicating high severity with network attack vector, low attack complexity, no privileges required, user interaction required, and high impact on confidentiality, integrity, and availability.
Potential Impact
Successful exploitation allows an attacker to write 64 bytes of attacker-controlled data beyond the allocated heap buffer for chroma pixels during image decoding. This can lead to memory corruption, potentially resulting in arbitrary code execution, denial of service, or other impacts depending on the context in which libheif is used.
Mitigation Recommendations
A fix is available in libheif version 1.22.0. Users and vendors should upgrade to version 1.22.0 or later to remediate this vulnerability. No additional mitigations are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-13T15:02:00.628Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-32740","vendor":"Red Hat"}]
Threat ID: 6a0dc2e7ba1db4736284c269
Added to database: 05/20/2026, 14:19:19 UTC
Last enriched: 07/15/2026, 08:56:20 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 139
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.