Vulnerability · Published May 19, 2026 · Assigned by GitHub_M

CVE-2026-32882libheif: Heap Buffer OOB Read in overlay compositing due to wrong alpha stride

High 7.1

In plain English

A high-severity out-of-bounds read in libheif from strukturag. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 54% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.1High
Exploit odds (30 days)0.7%top 46.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

libheif is a HEIF and AVIF file format decoder and encoder. Versions 1.21.2 and prior contain a heap buffer over-read in HeifPixelImage::overlay() in libheif/pixelimage.cc. When compositing an overlay image (iovl) whose child image has a different bit depth for the alpha channel than for the color channels, the function indexes into the alpha plane using the color channel stride (in_stride) instead of the previously retrieved alpha_stride, causing reads past the end of the alpha buffer (up to 3,123 bytes for a 100×50 image with 10-bit color and 8-bit alpha). A crafted HEIF file can exploit this to cause a denial of service (crash) or potentially disclose adjacent heap memory through leaked bytes embedded in the decoded output pixels. This issue has been fixed in versionThis issue has been fixed in version 1.22.0.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12libheifno fix listedDEBIAN-CVE-2026-32882
Debian:13libheif1.19.8-1+deb13u1DEBIAN-CVE-2026-32882
Debian:14libheif1.23.1-1DEBIAN-CVE-2026-32882
Ubuntu:24.04:LTSlibheif1.17.6-1ubuntu4.4UBUNTU-CVE-2026-32882
Ubuntu:25.10libheif1.20.2-1ubuntu0.4UBUNTU-CVE-2026-32882
Ubuntu:26.04:LTSlibheif1.21.2-3ubuntu0.1UBUNTU-CVE-2026-32882

Affected products (as reported)

VendorProductVersions
strukturag libheif < 1.22.0

Weakness: CWE-125 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H

References