Heap-based Buffer Overflow Affecting libheif package, versions [0,]


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (12th 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 Heap-based Buffer Overflow vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CONAN-LIBHEIF-16770101
  • published20 May 2026
  • disclosed19 May 2026
  • creditAdPortas0

Introduced: 19 May 2026

NewCVE-2026-32741  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

Affected versions of this package are vulnerable to Heap-based Buffer Overflow in the decode_mask_image function. An attacker can cause a heap buffer overflow by providing a crafted HEIF file containing a mask image where the iloc extent exceeds the allocated pixel buffer, leading to potential memory corruption or application crash. This is only exploitable if the mskC property specifies bits_per_pixel = 8 and the ispe property declares an even width greater than or equal to 64 (so that stride equals width), with no changes to default security limits or external codec plugins required.

CVSS Base Scores

version 4.0
version 3.1