CVE-2026-32882

Published May 19, 2026

Last updated 2 months ago

Overview

AI description

Automated description summarized from trusted sources.

CVE-2026-32882 identifies a heap buffer over-read vulnerability within `libheif`, a library responsible for decoding and encoding HEIF and AVIF image formats. This flaw affects `libheif` versions 1.21.2 and earlier. The vulnerability specifically arises in the `HeifPixelImage::overlay()` function when processing an overlay image where the alpha channel has a different bit depth than the color channels. In this scenario, the function incorrectly uses the color channel stride instead of the alpha stride, leading to reads beyond the allocated alpha buffer. Exploitation of CVE-2026-32882 can result in a denial of service due to application crashes or the potential disclosure of adjacent heap memory, with leaked bytes embedded in the decoded output pixels. While the vulnerability itself is an out-of-bounds read, it has been demonstrated in conjunction with other issues to achieve remote code execution (RCE) in various platforms that process HEIF/AVIF images, including OpenAI, Slack, Meta, Discourse, Next.js, and GitHub Enterprise. The issue was addressed in `libheif` version 1.22.0.

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.
Source
security-advisories@github.com
NVD status
Deferred

Risk scores

CVSS 3.1

Type
Secondary
Base score
7.1
Impact score
4.2
Exploitability score
2.8
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H
Severity
HIGH

Weaknesses

security-advisories@github.com
CWE-125
0b0ca135-0b70-47e7-9f44-1890c2a1c46c
CWE-125

Social media

Hype score
Not currently trending