CVE-2026-32882
JSON

7.1high

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

Severity
7.1high CVSS:3.1 by GitHub_M
Exploit likelihood
0.71% (higher than 54% of CVEs; EPSS, by FIRST)
Published
Last changed
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

Product or packageVersionsReported by
strukturag libheif< 1.22.0CVE List
glycin-loadersNot specifiedCVE List

All scores

GitHub_M7.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H
redhat-SADP7.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H

Classification

CWE-125

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

libheif es un decodificador y codificador de formato de archivo HEIF y AVIF. Las versiones 1.21.2 y anteriores contienen una lectura excesiva de búfer de montón en HeifPixelImage::overlay() en libheif/pixelimage.cc. Al componer una imagen de superposición (iovl) cuya imagen secundaria tiene una profundidad de bits diferente para el canal alfa que para los canales de color, la función indexa el plano alfa utilizando el paso del canal de color (in_stride) en lugar del alpha_stride recuperado previamente, lo que provoca lecturas más allá del final del búfer alfa (hasta 3.123 bytes para una imagen de 100×50 con color de 10 bits y alfa de 8 bits). Un archivo HEIF manipulado puede explotar esto para causar una denegación de servicio (bloqueo) o potencialmente divulgar memoria de montón adyacente a través de bytes filtrados incrustados en los píxeles de salida decodificados. Este problema ha sido solucionado en la versión 1.22.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-32882 changed 2026-07-15CVE Terms of Use
NVDCVE-2026-32882 changed 2026-07-24Public domain