CVE-2025-68431
JSON

6.5medium

libheif has Potential Heap Buffer Over-Read

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.75% (higher than 51% of CVEs)
Published
Last changed
Assigned by
GitHub_M

Description

libheif is an HEIF and AVIF file format decoder and encoder. Prior to version 1.21.0, a crafted HEIF that exercises the overlay image item path triggers a heap buffer over-read in `HeifPixelImage::overlay()`. The function computes a negative row length (likely from an unclipped overlay rectangle or invalid offsets), which then underflows when converted to `size_t` and is passed to `memcpy`, causing a very large read past the end of the source plane and a crash. Version 1.21.0 contains a patch. As a workaround, avoid decoding images using `iovl` overlay boxes.

Affected

Product or packageVersionsReported by
strukturag libheif< 1.21.0CVE List
struktur libheifbefore 1.21.0NVD

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD7.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H

Classification

CWE-125CWE-190

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

What each source says

CVE List

libheif is an HEIF and AVIF file format decoder and encoder. Prior to version 1.21.0, a crafted HEIF that exercises the overlay image item path triggers a heap buffer over-read in `HeifPixelImage::overlay()`. The function computes a negative row length (likely from an unclipped overlay rectangle or invalid offsets), which then underflows when converted to `size_t` and is passed to `memcpy`, causing a very large read past the end of the source plane and a crash. Version 1.21.0 contains a patch. As a workaround, avoid decoding images using `iovl` overlay boxes.

NVD (es)

libheif es un decodificador y codificador de formato de archivo HEIF y AVIF. Antes de la versión 1.21.0, un HEIF manipulado que ejerce la ruta del elemento de imagen de superposición desencadena una lectura excesiva del búfer de pila en 'HeifPixelImage::overlay()'. La función calcula una longitud de fila negativa (probablemente de un rectángulo de superposición no recortado o de desplazamientos no válidos), lo que luego provoca un desbordamiento negativo cuando se convierte a 'size_t' y se pasa a 'memcpy', causando una lectura muy grande más allá del final del plano de origen y un fallo. La versión 1.21.0 contiene un parche. Como solución alternativa, evite decodificar imágenes usando cajas de superposición 'iovl'.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-68431 changed 2025-12-30CVE Terms of Use
NVDCVE-2025-68431 changed 2026-10-07Public domain