Skip to main content

libheif CVE-2026-41071

MEDIUM
Out-of-bounds Read (CWE-125)
2026-05-22 GitHub_M
5.1
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft HEIF sequence file with oversized saiz sample count
  2. Delivery
    Deliver file to target user via email, web, or shared storage
  3. Exploit
    User opens file in libheif-linked application
  4. Execution
    heif_context_read_from_file() instantiates SampleAuxInfoReader
  5. Persist
    Loop iterates past end of chunks vector (CWE-125)
  6. Impact
    Out-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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Vendor (GitHub_M) PRIMARY 5.1 MEDIUM
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
SUSE 8.1 HIGH
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
May 26, 2026 - 20:07 NVD
5.1 (MEDIUM)
CVE Published
May 22, 2026 - 20:59 nvd
UNKNOWN (no severity yet)

DescriptionCVE.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

EPSS Score
0.0%
Top 89% exploitable
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:a:strukturag:libheif:*:*:*:*:*:*:*:*
CVE-2023-49464 HIGH POC
8.8 Dec 07

libheif v1.17.5 was discovered to contain a segmentation violation via the function UncompressedImageCodec::get_luma_bit

CVE-2023-49463 HIGH POC
8.8 Dec 07

libheif v1.17.5 was discovered to contain a segmentation violation via the function find_exif_tag at /libheif/exif.cc. R

CVE-2023-49462 HIGH POC
8.8 Dec 07

libheif v1.17.5 was discovered to contain a segmentation violation via the component /libheif/exif.cc. Rated high severi

CVE-2023-49460 HIGH POC
8.8 Dec 07

libheif v1.17.5 was discovered to contain a segmentation violation via the function UncompressedImageCodec::decode_uncom

CVE-2019-11471 HIGH POC
8.8 Apr 23

libheif 1.4.0 has a use-after-free in heif::HeifContext::Image::set_alpha_channel in heif_context.h because heif_context

CVE-2024-41311 HIGH POC
8.1 Oct 15

In Libheif 1.17.6, insufficient checks in ImageOverlay::parse() decoding a heif file containing an overlay image with fo

CVE-2024-25269 HIGH POC
7.5 Mar 05

libheif <= 1.17.6 contains a memory leak in the function JpegEncoder::Encode. Rated high severity (CVSS 7.5), this vulne

CVE-2025-68431 HIGH POC
7.1

Out-of-bounds read in libheif's HEIF/HEIC overlay processing can disclose limited memory contents and crash affected app

CVE-2023-29659 MEDIUM POC
6.5 May 05

A Segmentation fault caused by a floating point exception exists in libheif 1.15.1 using crafted heif images via the hei

CVE-2025-29482 MEDIUM POC
6.2 Apr 07

Buffer Overflow vulnerability in libheif 1.19.7 allows a local attacker to execute arbitrary code via the SAO (Sample Ad

CVE-2026-84383 CRITICAL
9.8 Sep 04

Heap-based buffer overflow in libheif before 1.23.2 allows remote attackers to corrupt memory and potentially achieve co

CVE-2026-32740 HIGH
8.8 May 19

Heap buffer overflow write in libheif (versions ≤ 1.21.2) lets a crafted HEIF/AVIF file write 64 bytes of attacker-contr

Vendor 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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy