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: 6.9 [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]
CVE-ID: N/A
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

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.


Affected software

libheif

Remediation

Install security update from vendor's website.

libheif - update to 1.22.0

External References

Related Security Bulletins