CVE-2026-32882: libheif heap buffer over-read in HeifPixelImage::overlay

CVE-2026-32882 · Severity: high · CVSS 7.1 · Published 2026-05-19

libheif is an open-source library used to encode and decode HEIF and AVIF image files, commonly used in image viewers and web browsers. A vulnerability exists where processing a specially crafted image file can cause the software to crash or potentially leak sensitive information from the computer's memory. This occurs when the library incorrectly handles images that use different levels of detail for color and transparency. Users are advised to update to version 1.22.0 to resolve this issue.

Technologies: struktur AG Libheif. Vendors: struktur AG.

Quick answers

Is CVE-2026-32882 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-32882 being exploited in the wild.
How severe is CVE-2026-32882?
High severity, with a CVSS score of 7.1, published 19 May 2026.
Which products and versions are affected?
struktur AG Libheif <= 1.21.2.
Is there a fix for CVE-2026-32882?
A patch was published on 2026-05-19: Fixed in version 1.22.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-32882 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-32882?
Check whether you run struktur AG Libheif at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A heap buffer over-read exists in libheif/pixelimage.cc within the HeifPixelImage::overlay() function. The vulnerability is triggered when compositing an overlay image (iovl) where the child image has a different bit depth for the alpha channel compared to the color channels. In this scenario, the function incorrectly uses the color channel stride (in_stride) to index into the alpha plane instead of the dedicated alpha_stride, leading to reads beyond the allocated alpha buffer. An attacker can exploit this via a crafted HEIF file to cause a denial of service (application crash) or potentially disclose adjacent heap memory by embedding leaked bytes into the decoded output pixels. The issue is fixed in version 1.22.0.

Affected products

  • strukturag libheif <= 1.21.2

Timeline

  • 2026-05-19: disclosed
  • 2026-05-19: patched: Fixed in version 1.22.0
  • 2026-05-19: advisory

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.