Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach app that builds region metadata via writer API
-
DeliverySupply geometry with undersized mask_data_len
-
Exploitheif_region_item_add stores buffer unchecked
-
Executionheif_region_get_mask_image reads past heap allocation
-
ImpactAdjacent heap bytes copied into mask image / crash
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an application that constructs region metadata through libheif's WRITER API and calls heif_region_item_add_region_inline_mask_data() with a mask_data_len that does not equal (width*height+7)/8, followed by a heif_region_get_mask_image() render. The file-parsing/decode path is explicitly NOT vulnerable because it validates the canonical mask size, so simply opening a malicious HEIF/AVIF file does not trigger it. Realistic risk is therefore limited to programs that let attacker-influenced geometry and mask buffers disagree while building inline-mask regions; affected versions are libheif prior to 1.23.2, and the vector is local (AV:L) with high attack complexity (AC:H). |
| Impact | This is a genuine but low-priority memory-safety issue, not a high-CVSS emergency. The vendor CVSS 3.1 base score is 4.0 (AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L), and the signals are internally consistent with a narrow, hard-to-reach bug: local vector, high attack complexity, limited confidentiality impact (partial heap disclosure) and low availability impact (crash). No EPSS score, no CISA KEV listing, and no public exploit are present in the intelligence - the only 'PoC' is a vendor regression test in tests/region.cc that demonstrates the OOB read, which is not a weaponized exploit. The single most important limiting factor, confirmed by both the description and the commit diff, is that ONLY the writer/encoder path is vulnerable: heif_region_item_add_region_inline_mask_data() trusts caller-supplied mask_data_len, whereas the file-PARSING path (RegionGeometry_InlineMask::parse) already validates the canonical mask size and is explicitly NOT affected. That inverts the usual libheif threat model - a malicious HEIF/AVIF file does NOT trigger this; instead an application must itself call the region-writer API with attacker-influenced geometry and an undersized mask buffer. There is no conflict between the CVSS vector and the description; both point to a local, application-integration-dependent issue rather than remote drive-by exploitation. |
| Exploit ScenarioDerived | An application uses libheif's writer API to attach inline-mask region metadata, deriving mask geometry (width/height) and the mask buffer from separate, partly attacker-controlled inputs. The attacker supplies a mask_data_len smaller than ceil(width*height/8), so a later heif_region_get_mask_image() call reads past the undersized heap allocation and copies adjacent heap bytes into the returned monochrome mask, disclosing heap contents or crashing the process. No public weaponized exploit exists; only a vendor regression test demonstrates the out-of-bounds read, and the CVSS AV:L/AC:H rating reflects that this requires a specific writer-API integration rather than remote file parsing. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 18, 2026
Heap out-of-bounds read in libheif prior to 1.23.2 lets an application that builds inline-mask region metadata through the library's writer API leak adjacent heap memory or crash. Specifically, heif_region_item_add_region_inline_mask_data() stored a caller-supplied mask buffer without verifying that mask_data_len equals ceil(width*height/8); a later heif_region_get_mask_image() render derives the number of bytes to read from the region geometry, so an undersized buffer causes the reader to copy bytes past the end of the allocation into the returned monochrome mask image. The file-parsing/decode path validates the canonical mask size and is explicitly not vulnerable, so merely opening a crafted HEIF/AVIF file does not trigger the bug; exploitation requires a local program in which attacker-influenced geometry and mask data disagree, consistent with the assessed vector AV:L/AC:H/PR:N/UI:N (CVSS 4.0). There is no confirmed active exploitation (no CISA KEV listing), and no public exploit code was identified at time of analysis; the issue is a genuine but low-priority memory-safety defect rather than an emergency, and version 1.23.2 fixes it.
RemediationAI
Vendor-released patch: libheif 1.23.2 - upgrade to that version (or later) from https://github.com/strukturag/libheif/releases/tag/v1.23.2, which incorporates commit 646d85fbf5bd18fc3cdc516e915e59072de2d510 and enforces mask_data_len == (width*height+7)/8, rejects null and zero-dimension masks, and adds a bounds check in the reader; the upstream advisory is https://github.com/strukturag/libheif/security/advisories/GHSA-p58j-h3vm-3fp5. If immediate upgrade is not possible, the practical compensating control is to change calling code rather than the library: ensure every call to heif_region_item_add_region_inline_mask_data() passes a mask buffer of exactly ceil(width*height/8) bytes and non-zero width/height, deriving that size from the same geometry used for the region, and reject or clamp attacker-influenced inputs before they reach the API - the trade-off is that mismatched-but-harmless oversized buffers that previously worked silently will now need to be trimmed by the caller, and any input path where geometry and mask data can disagree must be removed or validated. As a secondary containment measure, applications that render inline-mask regions from untrusted geometry should validate dimensions and buffer lengths at their own boundary before calling the writer API, since patched versions will reject such mismatches with heif_error_Invalid_input rather than accepting them. No patch is required for pure decode/parse workloads, which were never vulnerable; note there is no vendor-released fix for versions below 1.23.2 other than the upgrade.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
libheif is a HEIF and AVIF decoder/encoder whose region API (libheif/api/libheif/heif_regions.cc) supports inline-mask regions, where a bitmask with one bit per pixel is stored as ceil(width*height/8) bytes with no inter-row padding beyond the final byte. The root cause is CWE-125 (Out-of-Bounds Read): the writer-side function heif_region_item_add_region_inline_mask_data() accepted mask_data_len verbatim and resized the internal region->mask_data buffer to that value, instead of recomputing the canonical byte count from the supplied width and height as RegionGeometry_InlineMask::parse() does on the file-parsing path. Because heif_region_get_mask_image()/heif_region_get_inline_mask_image() compute the read length from geometry, a buffer shorter than the canonical size causes reads past the heap allocation at mask_data[mask_byte], and those adjacent bytes are written into the output mask image (C:L), with a possible crash of the host application (A:L). The upstream fix adds null-pointer and zero-dimension checks, rejects any mask_data_len that does not equal (width*height+7)/8 with heif_error_Invalid_input/heif_suberror_Invalid_region_data, guards against size overflow, and adds defence-in-depth bounds checking (mask_byte < mask_data_len) in the reader; a regression test covers a 64x3 region requiring 24 bytes of mask data. The affected CPE is strukturag:libheif (all versions prior to 1.23.2).
Know when Libheif gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L
Only reachable via the local writer-API integration with mismatched geometry/mask buffer (AV:L, AC:H); no auth needed (PR:N); partial heap disclosure (C:L) and possible crash (A:L).
AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
libheif is a HEIF and AVIF file format decoder and encoder. Prior to 1.23.2, the public heif_region_item_add_region_inline_mask_data() function in libheif/api/libheif/heif_regions.cc accepts mask_data_len without verifying that it equals the byte count required by width and height. A later heif_region_get_mask_image() call derives the read length from the region geometry, so an undersized stored buffer causes heif_region_get_inline_mask_image() to read beyond the heap allocation and copy adjacent bytes into the returned monochrome mask image. This can disclose heap data or crash an application that constructs region metadata through the writer API, while the file-parsing path is not affected because it validates the canonical mask size. This issue is fixed in version 1.23.2.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
libheif v1.17.5 was discovered to contain a segmentation violation via the function UncompressedImageCodec::get_luma_bit
libheif v1.17.5 was discovered to contain a segmentation violation via the function find_exif_tag at /libheif/exif.cc. R
libheif v1.17.5 was discovered to contain a segmentation violation via the component /libheif/exif.cc. Rated high severi
libheif v1.17.5 was discovered to contain a segmentation violation via the function UncompressedImageCodec::decode_uncom
libheif 1.4.0 has a use-after-free in heif::HeifContext::Image::set_alpha_channel in heif_context.h because heif_context
In Libheif 1.17.6, insufficient checks in ImageOverlay::parse() decoding a heif file containing an overlay image with fo
libheif <= 1.17.6 contains a memory leak in the function JpegEncoder::Encode. Rated high severity (CVSS 7.5), this vulne
Out-of-bounds read in libheif's HEIF/HEIC overlay processing can disclose limited memory contents and crash affected app
A Segmentation fault caused by a floating point exception exists in libheif 1.15.1 using crafted heif images via the hei
Buffer Overflow vulnerability in libheif 1.19.7 allows a local attacker to execute arbitrary code via the SAO (Sample Ad
Heap-based buffer overflow in libheif before 1.23.2 allows remote attackers to corrupt memory and potentially achieve co
Heap buffer overflow write in libheif (versions ≤ 1.21.2) lets a crafted HEIF/AVIF file write 64 bytes of attacker-contr
Same weakness CWE-125 – Out-of-bounds Read
View allSame technique Buffer Overflow
View allVendor StatusVendor
SUSE
Severity: Moderate| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
| SUSE Linux Enterprise Module for Desktop Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Affected |
| SUSE Linux Enterprise Desktop 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Desktop Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Affected |
| SUSE Linux Enterprise Server 15 SP7 | Affected |
| SUSE Linux Enterprise Server 16.0 | Affected |
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Module for Desktop Applications 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Module for Desktop Applications 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Module for Desktop Applications 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Not-Affected |
| SUSE Linux Enterprise Server 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP4 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Desktop 15 SP6 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Not-Affected |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Not-Affected |
| SUSE Linux Enterprise Real Time 15 SP4 | Not-Affected |
| SUSE Manager Proxy 4.3 | Not-Affected |
| SUSE Manager Retail Branch Server 4.3 | Not-Affected |
| SUSE Manager Server 4.3 | Not-Affected |
| openSUSE Leap 15.4 | Not-Affected |
| openSUSE Leap 15.5 | Not-Affected |
| openSUSE Leap 15.6 | Not-Affected |
EUVD-2026-83015
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB