Skip to main content

libheif CVE-2026-62291

| EUVDEUVD-2026-62190 MEDIUM
Out-of-bounds Read (CWE-125)
2026-08-18 security-advisories@github.com
5.3
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Recon
    Craft HEIF sequence with mismatched 2x2 primary and 256x256 alpha track
  2. Delivery
    Deliver file to decode/re-encode application
  3. Exploit
    Decode proceeds without alpha dimension check in decode_next_image_sample()
  4. Install
    Inconsistent HeifPixelImage reaches uncompressed encoder
  5. C2
    Buffer allocated from primary 2x2 dimensions via compute_tile_data_size_bytes()
  6. Execute
    encode_tile() copies 256x256 alpha plane past allocation end
  7. Impact
    Heap out-of-bounds write corrupts adjacent memory

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 the target application to execute a complete decode-then-re-encode workflow on attacker-supplied input using the uncompressed (heif_compression_uncompressed) encoder path - applications that only decode for display without re-encoding are not vulnerable via this specific code path. The crafted file must be an image sequence (not a still image) with a primary track and an auxiliary alpha track of differing dimensions. User interaction is required per CVSS (UI:R): a user must open the file or an automated system must ingest it into a pipeline. No elevated privileges are required (PR:N per CVSS). Limiting factors: decode-only viewers are unaffected; applications using non-uncompressed codecs (HEVC, AV1) for re-encoding do not trigger the vulnerable encoder path; ASLR and heap hardening on modern platforms complicate escalation from OOB write to reliable RCE.

Impact

CVSS 5.3 Medium with vector AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L correctly identifies this as a file-processing flaw that requires user or application action to trigger. The local attack vector and required user interaction meaningfully bound exposure: opportunistic network-scale attacks are not possible, and exploitation requires the crafted file to reach a decode-then-re-encode pipeline. However, the impact ratings of L/L/L may understate real-world severity - attacker-controlled heap corruption has historically been leveraged to achieve arbitrary code execution, which would elevate the effective impact to C:H/I:H/A:H on vulnerable processes. The conservative CVSS scoring likely reflects the absence of a confirmed RCE path rather than the inherent primitives the bug provides. No EPSS data was included in the intelligence; no KEV listing exists; no standalone public exploit has been observed beyond the regression test shipped with the patch. Real-world priority should be higher for applications performing automated, server-side decode/re-encode on untrusted HEIF/AVIF inputs (thumbnail generators, transcoders, batch media processors) than for interactive image viewers where UI:R naturally limits the attack surface.

Exploit ScenarioDerived

An attacker crafts a HEIF image sequence file containing a 2x2 luma primary track and a 256x256 auxiliary alpha track, then delivers it to a media processing pipeline - via email attachment, a web form accepting image uploads, or injection into a batch transcoding job. When the application decodes and re-encodes the file using libheif's uncompressed encoder (a common thumbnail generation or format conversion workflow), the encoder copies 65,536 alpha samples into a 4-sample heap allocation, overwriting adjacent heap metadata and potentially enabling code execution depending on heap layout and available exploit mitigations.

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

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

Alert me

AnalysisAIv1 – Aug 19, 2026

Heap out-of-bounds write and read in libheif 1.23.0 and earlier allows an attacker who can supply a crafted HEIF/AVIF image sequence to corrupt heap memory during any application decode-then-re-encode workflow. The flaw stems from the uncompressed encoder allocating output buffers from primary image dimensions (e.g., 2x2) while copying each component plane using that plane's actual stored size (e.g., a mismatched 256x256 alpha plane), writing 65536 pixels worth of data into a 4-pixel allocation. No public exploit has been identified at time of analysis and no CISA KEV listing exists, but the fix commit includes a purpose-built regression test that directly reproduces the heap overflow, confirming the root cause.

RemediationAI

Upgrade to libheif 1.23.1, available at https://github.com/strukturag/libheif/releases/tag/v1.23.1, which introduces the check_component_sizes() validation guard that rejects images with inconsistent component plane dimensions before encoding. This is the only complete fix; no configuration-based workaround exists for the check_component_sizes gap itself. If immediate upgrade is not feasible for automated pipeline environments, operators should add pre-processing validation to reject HEIF/AVIF input files containing image sequences where auxiliary track dimensions differ from the primary track - this can be done at the container-parsing layer before libheif decode. As a further compensating control, restricting decode+re-encode workflows to trusted input sources (disabling user-supplied HEIF files in server-side pipelines) eliminates the attack surface entirely. Interactive applications where the user chooses the file carry lower urgency due to the UI:R requirement but should still be patched to prevent social-engineering scenarios.

Affected VersionsENISA

libheif < 1.23.1

Affected Packages

euvd libheif fix: 1.23.1

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 (pkg:github/strukturag/libheif) is a C++ library implementing HEIF and AVIF image container decoding and encoding, used widely in Linux desktop environments (GNOME, KDE), Apple ecosystem tooling, and server-side media pipelines. HEIF supports image sequences with separate auxiliary tracks - including an alpha channel track that can legally have different dimensions from the primary color track. The root cause (CWE-125, OOB Read, with a co-occurring OOB Write) is a missing dimension consistency check at the boundary between the decoder and the uncompressed encoder. Specifically, Track_Visual::decode_next_image_sample() calls transfer_channel_from_image_as() without asserting that the auxiliary alpha plane dimensions match the primary frame. The resulting HeifPixelImage object carries contradictory internal state - a 2x2 primary plane and a 256x256 alpha plane - which propagates unchecked into heif_context_encode_image(). Inside unc_encoder::encode(), compute_tile_data_size_bytes() sizes the output buffer from the primary 2x2 dimensions, but encode_tile() iterates each component using that component's actual stored dimensions, causing a massive memcpy overrun into adjacent heap memory. The inverse configuration (primary larger than alpha) produces an OOB read. The fix in v1.23.1 introduces check_component_sizes() which iterates all planar component IDs and rejects any image whose component plane dimensions are inconsistent with the primary image size before encoding begins.

Know when the next one hits your stack

  • 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) PRIMARY 5.3 MEDIUM
AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
vuln.today AI 6.6 MEDIUM

Heap corruption from OOB write reliably crashes the encoder process (A:H); OOB read adds limited heap disclosure (C:L); no confirmed RCE path justifies I:L.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
SUSE 6.8 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H

Primary rating from Vendor (github).

CVSS VectorVendor: github

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

Lifecycle Timeline

1
Patch available
Aug 18, 2026 - 22:19 EUVD

DescriptionCVE.org

libheif is a HEIF and AVIF file format decoder and encoder. In 1.23.0 and earlier, a crafted image sequence with a 2x2 primary plane and a 256x256 auxiliary alpha plane can cause attacker-controlled heap corruption during a normal decode and re-encode workflow. Track_Visual::decode_next_image_sample() calls transfer_channel_from_image_as() without checking that the auxiliary alpha dimensions match the main frame. The resulting inconsistent image reaches heif_track_decode_next_image() and then heif_context_encode_image(). In unc_encoder::encode(), unc_encoder_component_interleave::encode_tile() sizes its buffer with compute_tile_data_size_bytes() using the primary dimensions but copies each component using its actual plane dimensions. The oversized alpha plane is therefore copied beyond the allocation, causing an out-of-bounds write; the inverse size mismatch can also produce an out-of-bounds read. This issue is fixed in version 1.23.1.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Medium
HEIF/AVIF decoder library embedded in many desktop and server image tools
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub

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.2%
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
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

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.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 SUSE Linux Enterprise High Performance Computing 15 SP7 SUSE Linux Enterprise Module for Desktop Applications 15 SP7 SUSE Linux Enterprise Server 15 SP7 SUSE Linux Enterprise Server for SAP Applications 15 SP7 Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP7 Fixed
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected

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