Heap-based buffer overflow in libheif - #VU131970

 

Heap-based buffer overflow in libheif - #VU131970

Published: May 20, 2026


Vulnerability identifier: #VU131970
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 heif_region_item_add_region_inline_mask in libheif/api/libheif/heif_regions.cc when processing crafted region mask dimensions. A remote attacker can trigger a 32-bit multiplication overflow in width and height calculations to create an undersized buffer and then overflow it with a subsequent memset to cause a denial of service or potentially execute arbitrary code.


Affected software

libheif

Remediation

Install security update from vendor's website.

libheif - update to 1.22.0

External References

Related Security Bulletins