Skip to content
OpenAdvisories
High · 7.1 CVE-2026-32882 EUVD-2026-30981

libheif: Heap Buffer OOB Read in overlay compositing due to wrong alpha stride

Published May 19, 2026 · Updated Jul 15, 2026 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
strukturag libheif < 1.22.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libheif 1.23.1-1 —
Debian 13 libheif 1.19.8-1+deb13u1 —
Debian 12 libheif No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS libheif 1.21.2-3ubuntu0.1 —
Ubuntu 25.10 libheif 1.20.2-1ubuntu0.4 —
Ubuntu 24.04 LTS libheif 1.17.6-1ubuntu4.4 —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS libheif 1.12.0-2ubuntu0.1~esm3 —
Ubuntu Pro 20.04 LTS libheif 1.6.1-1ubuntu0.1~esm3 —
Ubuntu Pro 18.04 LTS libheif 1.1.0-2ubuntu0.1~esm3 —
ReleasePackageFixed inAdvisory
SLES 15 SP7 libheif 1.23.0-150700.3.15.1 SUSE-SU-2026:2622-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 libheif 1.23.0-160000.1.1 SUSE-SU-2026:22153-1
SLES 16.0 libheif 1.23.0-160000.1.1 SUSE-SU-2026:22153-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed libheif 1.22.2-1.1 openSUSE-SU-2026:10878-1
openSUSE Leap 16.0 libheif 1.23.0-160000.1.1 openSUSE-SU-2026:20974-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 libheif +3 1.19.8-1.amzn2023.0.5 ALAS2023-2026-1814

Advisories 5

References