Out-of-bounds Read Affecting libheif package, versions <1.6.1-1ubuntu0.1~esm2


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.04% (14th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Out-of-bounds Read vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UBUNTU2004-LIBHEIF-14849609
  • published8 Jan 2026
  • disclosed29 Dec 2025

Introduced: 29 Dec 2025

CVE-2025-68431  (opens in a new tab)
CWE-125  (opens in a new tab)
CWE-190  (opens in a new tab)

How to fix?

Upgrade Ubuntu:20.04 libheif to version 1.6.1-1ubuntu0.1~esm2 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream libheif package and not the libheif package as distributed by Ubuntu. See How to fix? for Ubuntu:20.04 relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1