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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | libheif | no fix listed | DEBIAN-CVE-2026-32882 |
| Debian:13 | libheif | 1.19.8-1+deb13u1 | DEBIAN-CVE-2026-32882 |
| Debian:14 | libheif | 1.23.1-1 | DEBIAN-CVE-2026-32882 |
| Ubuntu:24.04:LTS | libheif | 1.17.6-1ubuntu4.4 | UBUNTU-CVE-2026-32882 |
| Ubuntu:25.10 | libheif | 1.20.2-1ubuntu0.4 | UBUNTU-CVE-2026-32882 |
| Ubuntu:26.04:LTS | libheif | 1.21.2-3ubuntu0.1 | UBUNTU-CVE-2026-32882 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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
- https://github.com/strukturag/libheif/security/advisories/GHSA-hg7q-rjr2-8x46 x_refsource_CONFIRM
- https://github.com/strukturag/libheif/releases/tag/v1.22.0 x_refsource_MISC
- https://access.redhat.com/security/cve/CVE-2026-32882 vdb-entry, x_refsource_REDHAT
- RHBZ#2480000 issue-tracking, x_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32882.json x_sadp-csaf-vex