Skip to content
OpenAdvisories
Medium · 6.5 CVE-2025-68431 EUVD-2025-205646

libheif has Potential Heap Buffer Over-Read

Published Dec 29, 2025 · Updated Dec 30, 2025 · 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 products

VendorProductAffectedFixed
strukturag libheif < 1.21.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libheif 1.21.2-1 —
Debian 13 libheif 1.19.8-1+deb13u1 —
Debian 12 libheif No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS libheif 1.21.2-1 —
Ubuntu 25.10 libheif 1.20.2-1ubuntu0.1 USN-7952-1
Ubuntu 24.04 LTS libheif 1.17.6-1ubuntu4.2 USN-7952-1
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS libheif 1.12.0-2ubuntu0.1~esm2 USN-7952-1
Ubuntu Pro 20.04 LTS libheif 1.6.1-1ubuntu0.1~esm2 USN-7952-1
Ubuntu Pro 18.04 LTS libheif 1.1.0-2ubuntu0.1~esm2 USN-7952-1
ReleasePackageFixed inAdvisory
SLES 15 SP7 libheif 1.19.5-150700.3.3.1 SUSE-SU-2026:2622-1, SUSE-SU-2026:0087-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 libheif 1.19.7-160000.3.1 SUSE-SU-2026:22153-1, SUSE-SU-2026:20121-1
SLES 16.0 libheif 1.19.7-160000.3.1 SUSE-SU-2026:22153-1, SUSE-SU-2026:20121-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed libheif 1.21.1-1.1 openSUSE-SU-2026:10019-1
openSUSE Leap 16.0 libheif 1.19.7-160000.3.1 openSUSE-SU-2026:20974-1, openSUSE-SU-2026:20076-1
openSUSE Leap 15.6 libheif 1.12.0-150400.3.17.1 SUSE-SU-2026:0377-1
ReleasePackageFixed inAdvisory
Alpine v3.24 libheif 1.21.2-r0 —
Alpine v3.23 libheif 1.21.2-r0 —
Alpine v3.22 libheif 1.19.8-r1 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 libheif +3 1.19.8-1.amzn2023.0.3 ALAS2023-2026-1363

Advisories 13

References