CVE-2026-32882: libheif: Heap Buffer OOB Read in overlay compositing due to wrong alpha stride
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.
Security readout for executives and security teams
Plain-English summary
libheif before 1.22.0 can read past a memory buffer when handling a specially crafted HEIF overlay image. A victim must process the file. The main business risk is service crash in image-processing workflows, with a possible limited leak of nearby heap memory through decoded pixels.
Executive priority
Treat as high priority for internet-facing or customer-file-processing systems. Patch through normal urgent maintenance, especially where image decoding affects availability or handles sensitive workloads.
Technical view
HeifPixelImage::overlay() uses the color-channel stride instead of alpha_stride when compositing an iovl child with different alpha and color bit depths. This causes a heap out-of-bounds read. Sources describe denial of service and possible adjacent heap disclosure. Fixed in libheif 1.22.0.
Likely exposure
Exposure is most likely where libheif 1.21.2 or earlier decodes untrusted HEIF or AVIF files, including upload pipelines, media processing services, and applications bundling the library.
Exploitation context
The CVSS vector requires user interaction and no privileges. The source bundle does not show CISA KEV listing or active exploitation evidence. Abuse requires a crafted HEIF file that reaches a vulnerable decoder.
Researcher notes
The strongest evidence is the upstream advisory: CWE-125, CVSS 7.1, affected versions below 1.22.0, and the specific alpha stride bug. The bundle does not provide public exploit confirmation.
Mitigation direction
Upgrade libheif to version 1.22.0 or a vendor-patched package.
Prioritize systems that process user-supplied HEIF or AVIF files.
Check Red Hat and other vendor advisories for package-specific status.
Temporarily limit untrusted HEIF/AVIF processing where patching is delayed.
Run image-processing components with isolation and least privilege.
Validation and detection
Inventory libheif versions in hosts, containers, and bundled applications.
Confirm vulnerable assets are upgraded beyond 1.21.2 or vendor-patched.
Map public upload, attachment, and media-conversion paths using libheif.
Review crash telemetry around HEIF or AVIF processing.
Verify downstream packages link against the patched library.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-125: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-125 · source CWE mapping
Out-of-bounds Read
Out-of-bounds Read represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.