Heap-based buffer overflow in libheif - #VU131968

 

Heap-based buffer overflow in libheif - #VU131968

Published: May 20, 2026


Vulnerability identifier: #VU131968
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: N/A
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: struktur AG
Affected software:
libheif

Detailed vulnerability description

The vulnerability allows a remote attacker to cause a denial of service or potentially execute arbitrary code.

The vulnerability exists due to heap-based buffer overflow in image plane allocation in libheif/pixelimage.cc when processing crafted image data or using the public heif_image_add_plane API. A remote attacker can trigger a uint32_t stride calculation overflow that leads to an undersized heap allocation and subsequent out-of-bounds write to cause a denial of service or potentially execute arbitrary code.

The security limit check validates pixel count rather than stride, and the heif_image_add_plane code path bypasses limits entirely.


Remediation

Install security update from vendor's website.

Sources