Skip to main content

libheif CVE-2026-41069

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

Attack ChainAIDerived

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

  1. Access
    Craft HEIF file with malformed stco/saiz box values
  2. Delivery
    Deliver file to target via web or email
  3. Exploit
    User opens or application ingests file
  4. Execution
    libheif sequence parser processes track
  5. Persist
    SampleAuxInfoReader dereferences empty chunks[0]
  6. Impact
    Out-of-bounds read crashes host process (DoS)

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 that the target application process a specially crafted HEIF file containing a sequence track where stco.entry_count 0, saio.entry_count 0, and saiz.sample_count > 0 - this specific combination of box values is the necessary trigger. User interaction is required per CVSS UI:R: a user or automated job must open or ingest the malicious file. No authentication is required (CVSS PR:N), and no non-default configuration is needed beyond the application simply using libheif for HEIF/AVIF decoding. Exploitation is limited to denial of service (application crash); confidentiality and integrity are not impacted per the CVSS vector. Deployments that process only AVIF still-image files without sequence tracks are not exposed to this specific code path. Applications that validate or strip sequence-type boxes before passing data to libheif would also not be affected.

Impact

CVSS 3.1 scores this 6.5 (Medium). The vector AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H shows broad network reachability with no authentication or privilege requirement, but user interaction is mandatory - exploitation cannot proceed without a user or automated pipeline actively opening the malicious file. Real-world risk is therefore contingent on how libheif is deployed: embedded in a browser or OS image subsystem, the UI:R bar is trivially met by browsing to or downloading a crafted image; invoked as a backend server-side transcoder with untrusted input, the UI:R criterion may effectively be absent in practice because the 'user' is an automated job. No EPSS data was provided in the supplied intelligence. KEV status is not listed, meaning CISA has not confirmed active exploitation. No public proof-of-concept has been identified at time of analysis. Impact is purely availability (application crash / DoS); confidentiality and integrity are unaffected per CVSS. The advisory tags list 'Information Disclosure', which conflicts with CVSS C:N - this inconsistency should be verified with the vendor, as some out-of-bounds read primitives can leak memory contents before crashing. Overall, this is a genuine medium-priority issue for any deployment that processes untrusted HEIF files, but without active exploitation evidence it does not warrant emergency-level response.

Exploit ScenarioDerived

An attacker crafts a malformed HEIF sequence file with stco.entry_count set to zero and saiz.sample_count set to a non-zero value, then distributes it via email attachment, web download, or a malicious image-sharing link. When a user opens the file in any application embedding libheif 1.21.2 or earlier - such as an image viewer, browser, or media importer - the SampleAuxInfoReader constructor dereferences the empty chunks vector, triggering an out-of-bounds read that crashes the hosting process. No public exploit code has been identified at time of analysis, but the parsing path is straightforward to reach and the triggering conditions are precisely described in the advisory, lowering the bar for independent exploit development.

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 – May 22, 2026

Out-of-bounds read in libheif versions 1.21.2 and prior crashes any application that parses attacker-controlled HEIF sequence files, resulting in denial of service. The defect lives in the SampleAuxInfoReader constructor, which enters its processing loop when saiz.sample_count > 0 even though stco.entry_count == 0 left the chunks vector empty; dereferencing chunks[0] then triggers the crash. No public exploit code has been identified at time of analysis, but the attack requires only that a user open or process a specially crafted HEIF file, making it relevant wherever libheif is embedded in image-handling applications (browsers, media libraries, operating-system image stacks). Vendor-released patch v1.22.0 is available.

RemediationAI

Upgrade libheif to version 1.22.0, which is confirmed as the vendor-released patch per the GitHub release at https://github.com/strukturag/libheif/releases/tag/v1.22.0 and the security advisory at https://github.com/strukturag/libheif/security/advisories/GHSA-p82x-fpmv-576r. Downstream package maintainers should rebuild against 1.22.0; statically-linked applications must be recompiled. If immediate upgrade is not possible, the most effective compensating control is to reject or sandbox HEIF sequence files at the application or ingestion-pipeline boundary before they reach libheif - for example, by blocking HEIF/AVIF files at a content-type filter or stripping sequence-type tracks in a pre-processing step. This reduces attack surface but may break legitimate multi-frame HEIF content. Alternatively, running the libheif decoding process in an isolated sandbox (container, seccomp profile, or separate worker process) limits a crash to DoS of that worker rather than the parent application. Note: the v1.22.0 release is a large functional update with new codec architecture (ISO/IEC 23001-17 rewrite, generic image components); validate application compatibility with the new release before wide deployment.

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:*:*:*:*:*:*:*:*, versions up to and including 1.21.2) is an open-source C++ library for decoding and encoding the High Efficiency Image File Format (HEIF) and AVIF. The flaw is rooted in the sequence-track parsing logic that handles auxiliary sample information - the data structures stco (chunk offset box), saio (sample auxiliary information offsets box), and saiz (sample auxiliary information sizes box). The library validates saio.entry_count 0 as a sufficient signal that no auxiliary chunks are expected, but does not cross-check saiz.sample_count before constructing a SampleAuxInfoReader in chunked mode. When a malicious file sets stco.entry_count 0 alongside saiz.sample_count > 0, the constructor enters its iteration loop and dereferences chunks[0] on an empty vector - a classic CWE-125 (Out-of-Bounds Read) caused by missing bounds enforcement across correlated fields from separate boxes. The tags on this advisory include 'Buffer Overflow' and 'Information Disclosure', but the CVSS vector records Confidentiality: None; the out-of-bounds read likely crashes the process before any memory content is surfaced, making DoS the confirmed impact at this time.

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 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
SUSE 5.5 MEDIUM
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

libheif is a HEIF and AVIF file format decoder and encoder. In versions 1.21.2 and prior, a malformed HEIF sequence file can trigger an out-of-bounds read in core sequence parsing logic, causing DoS. A malformed file can have stco.entry_count 0 (creating no chunks) while still passing validation because saio.entry_count 0 matches, but with saiz.sample_count > 0 the SampleAuxInfoReader constructor still enters its loop. This leads to an out-of-bounds dereference on the empty chunks[0] in chunked mode.

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Data Quality
7 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment 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
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
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: Medium
Product Status
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

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