libheif
CVE-2026-41071
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft HEIF sequence file with oversized saiz sample count
-
DeliveryDeliver file to target user via email, web, or shared storage
-
ExploitUser opens file in libheif-linked application
-
Executionheif_context_read_from_file() instantiates SampleAuxInfoReader
-
PersistLoop iterates past end of chunks vector (CWE-125)
-
ImpactOut-of-bounds heap read yields memory disclosure or process 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 | The victim must actively open a crafted HEIF sequence file (CVSS UI:A), making passive or zero-click exploitation impossible without an additional delivery vector. The vulnerable code path is specific to HEIF sequence files containing a saiz (sample auxiliary information size) box - standard still-image HEIF files without this box are not affected. No authentication, special privileges, or non-default configuration is required on the target system (CVSS PR:N, AC:L). Exploitation is limited by the requirement for user interaction, the low-to-moderate memory impact (partial heap read, no confirmed write primitive), and the absence of publicly known exploit code. Defenders in environments where HEIF sequence files are not a business requirement can effectively eliminate this attack surface by blocking the file type at ingestion points. |
| Impact | The CVSS 4.0 score of 5.1 (Medium) is consistent with the impact profile: AV:N establishes network reachability through file delivery, AC:L and AT:N confirm no special conditions or prior foothold are needed, PR:N indicates no authentication is required, but UI:A (user must actively open the file) limits opportunistic exploitation. Confidentiality and availability impacts are both rated Low (VC:L, VA:L) with no integrity impact, meaning the realistic worst-case is a partial heap-memory leak or application crash rather than full code execution as currently scored. EPSS of 0.04% at the 11th percentile strongly suggests no observed exploitation activity and low threat-actor interest at this time. No CISA KEV listing and no public exploit code are confirmed. The SUSE tag indicates downstream distribution packaging exposure, which broadens the installed base but does not change the individual risk calculus. One area to monitor: CWE-125 out-of-bounds reads in media parsers have historically been chained as information leaks to defeat ASLR in more complex exploit chains; the current score may understate long-term risk if combined with a write primitive elsewhere in the parser. |
| Exploit ScenarioDerived | An attacker crafts a HEIF sequence file in which the saiz box reports a sample count substantially higher than the number of samples referenced in the track's chunk offset table, then distributes this file via email attachment, web download, or shared storage. When a user on an unpatched system opens the file in any libheif-linked application - an image viewer, a photo editor, or a browser with HEIF support - heif_context_read_from_file() instantiates SampleAuxInfoReader, the loop runs past the end of the chunks heap buffer, and the process either leaks adjacent heap contents (potentially exposing pointers or sensitive data) or crashes with a segmentation fault. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 08, 2026
Heap-buffer-overflow in libheif 1.21.2 and prior exposes any application parsing untrusted HEIF sequence files to an out-of-bounds read during file ingestion, with potential for heap memory disclosure or process crash. The flaw is triggered the moment a victim opens a crafted file - no additional interaction beyond file opening is required - making it a practical threat in desktop image viewers, browsers, and media pipelines that embed libheif. No public exploit has been identified at time of analysis, EPSS sits at 0.04% (11th percentile), and a vendor-released patch (v1.22.0) is available, keeping real-world exploitation risk currently assessed as low-moderate despite the memory-corruption class.
RemediationAI
The primary fix is upgrading to libheif v1.22.0, available at https://github.com/strukturag/libheif/releases/tag/v1.22.0; this release adds bounds validation in the SampleAuxInfoReader constructor to ensure the saiz sample count is checked against the actual chunks vector size before iteration. Downstream package maintainers (including SUSE) should update their libheif packages to v1.22.0 or apply the upstream patch. If an immediate upgrade is not feasible, the most actionable compensating control is to block or sandbox processing of externally sourced HEIF sequence files - for example, stripping HEIF/AVIF attachments at mail or proxy gateways, or running libheif-dependent workloads in a restricted process with limited heap access (e.g., seccomp sandbox, chroot) to contain the impact of a successful out-of-bounds read. Note that blocking all HEIF input may impact legitimate workflows in image pipelines or Apple ecosystem integrations.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
libheif (CPE: cpe:2.3:a:strukturag:libheif:*:*:*:*:*:*:*:*) is an open-source C++ library for decoding and encoding HEIF and AVIF container formats built on the ISO Base Media File Format (ISOBMFF). The vulnerable path lies in the SampleAuxInfoReader constructor, which processes the 'saiz' box - an ISOBMFF structure that records per-sample auxiliary information sizes. The constructor iterates from zero up to saiz->get_num_samples() but performs no bounds check against the actual size of the chunks vector, which is populated from the track's chunk offset table. CWE-125 (Out-of-bounds Read) applies: when a crafted saiz box inflates the sample count beyond what the chunks table covers, the loop variable current_chunk is incremented past chunks.size(), causing a read beyond the end of the heap-allocated vector buffer. The flaw exists entirely within the file-parsing phase (heif_context_read_from_file), before any image decoding occurs.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
AV:N/AC:L/PR:N/UI:R/S:U/C:H/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. In versions 1.21.2 and prior, a crafted HEIF sequence file where the saiz box declares more samples than actually exist in the track's chunk table causes a heap-buffer-overflow (out-of-bounds read) in the SampleAuxInfoReader constructor. The SampleAuxInfoReader constructor iterates over saiz->get_num_samples() samples but doesn't validate that this count is consistent with the number of chunks in the chunks vector. When saiz declares more samples than the chunks cover, the loop increments current_chunk past chunks.size(), causing an out-of-bounds read on the chunks vector. The vulnerability is triggered during file parsing (heif_context_read_from_file) without any additional user interaction. Any application using libheif to open untrusted HEIF files is affected. This issue has been fixed in version 1.22.0.
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.
Affected Products (CPE)CVE.org
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: High| 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 High Performance Computing 15 SP7 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Affected |
| SUSE Linux Enterprise Desktop 15 SP7 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP7 | Fixed |
| SUSE Linux Enterprise Module for Desktop Applications 15 SP7 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Fixed |
| SUSE Linux Enterprise Server 15 SP7 | Fixed |
| SUSE Linux Enterprise Server 16.0 | Fixed |
| SUSE Linux Enterprise Server 16.1 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP7 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Fixed |
| openSUSE Leap 16.0 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Module for Desktop Applications 15 SP4 | Fixed |
| SUSE Linux Enterprise Module for Desktop Applications 15 SP5 | Fixed |
| SUSE Linux Enterprise Module for Desktop Applications 15 SP6 | Fixed |
| SUSE Linux Enterprise Server 15 SP4 | Fixed |
| SUSE Linux Enterprise Server 15 SP4-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP5 | Fixed |
| SUSE Linux Enterprise Server 15 SP5-LTSS | Fixed |
| SUSE Linux Enterprise Server 15 SP6 | Fixed |
| SUSE Linux Enterprise Server 15 SP6-LTSS | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | Fixed |
| SUSE Manager Proxy 4.3 | Fixed |
| SUSE Manager Retail Branch Server 4.3 | Fixed |
| SUSE Manager Server 4.3 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP4 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP5 | Fixed |
| SUSE Linux Enterprise Desktop 15 SP6 | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | Fixed |
| SUSE Linux Enterprise High Performance Computing 15 SP6 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Fixed |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Fixed |
| SUSE Linux Enterprise Real Time 15 SP4 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | Fixed |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | Fixed |
| openSUSE Leap 15.4 | Fixed |
| openSUSE Leap 15.5 | Fixed |
| openSUSE Leap 15.6 | Fixed |
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB