Out-of-bounds Read Affecting libheif package, versions <1.6.1-1ubuntu0.1~esm3


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.32% (25th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UBUNTU2004-LIBHEIF-16780936
  • published17 Jun 2026
  • disclosed19 May 2026

Introduced: 19 May 2026

CVE-2026-32882  (opens in a new tab)
CWE-125  (opens in a new tab)

How to fix?

Upgrade Ubuntu:20.04 libheif to version 1.6.1-1ubuntu0.1~esm3 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream libheif package and not the libheif package as distributed by Ubuntu. See How to fix? for Ubuntu:20.04 relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1