CVE-2025-68431: libheif has Potential Heap Buffer Over-Read
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 sizet 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 Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2025-68431?
CVE-2025-68431 has been classified as a moderate severity vulnerability due to the potential for heap buffer over-read.
How do I fix CVE-2025-68431?
To fix CVE-2025-68431, update libheif to version 1.21.0 or later.
What could be the impact of CVE-2025-68431?
The impact of CVE-2025-68431 could lead to unexpected behavior and possible exploitation due to heap buffer over-read.
On which versions of libheif is CVE-2025-68431 found?
CVE-2025-68431 affects versions of libheif prior to 1.21.0.
What type of vulnerability is CVE-2025-68431?
CVE-2025-68431 is a heap buffer over-read vulnerability triggered by crafted HEIF files.