Heap-based Buffer Overflow Affecting strukturag/libheif package, versions [1.22.0, 1.23.1)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.64% (50th 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-UNMANAGED-STRUKTURAGLIBHEIF-19652363
  • published9 Sept 2026
  • disclosed9 Sept 2026
  • creditHarsh Jaiswal

Introduced: 9 Sep 2026

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

How to fix?

Upgrade strukturag/libheif to version 1.23.1 or higher.

Overview

Affected versions of this package are vulnerable to Heap-based Buffer Overflow via the HeifPixelImage::scale_nearest_neighbor() path in libheif/image/pixelimage.cc and alpha attachment in libheif/image-items/image_item.cc. An attacker can trigger an out-of-bounds write by supplying a crafted HEIC/HEIF/AVIF file with nested iden and auxl item references that create duplicate Alpha planes with mismatched storage sizes. When the image is decoded and scaled, the scaler allocates the destination Alpha plane using the first plane’s bit depth and then writes later Alpha data as wider samples into that buffer, corrupting heap memory and crashing or hijacking the process.

CVSS Base Scores

version 4.0
version 3.1