Skip to main content

libheif CVE-2026-32739

| EUVDEUVD-2026-30975 MEDIUM
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-05-19 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 800-byte malicious HEIF sequence file
  2. Delivery
    Deliver file to libheif-based application (upload, email, API)
  3. Exploit
    Application invokes libheif file-open/parse on file
  4. Execution
    Box_stts::get_sample_duration() enters unbounded loop
  5. Persist
    CPU core pinned at 100% indefinitely with no error logged
  6. Impact
    Worker thread permanently unresponsive, service degraded or offline

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
MITRE ATT&CK

1 technique across 1 tactic: Impact

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 a victim application or automated process opens or parses a crafted HEIF sequence file using libheif 1.21.2 or below. The CVSS vector (UI:R) reflects that a user or automated process must trigger file parsing; in server-side pipelines that auto-process uploads, this condition is met without explicit human interaction. PR:N confirms no attacker authentication is required. The vulnerable code path is triggered specifically by HEIF sequence containers (not still HEIF/AVIF images), during the container parsing phase before any image decoding or user-facing interaction occurs. Exploitation is limited to availability impact only - there is no code execution, memory corruption, or data exfiltration component. Limiting factors include: only libheif versions below 1.22.0 are affected; deployments that do not accept external HEIF files are not exposed; and applications that sandbox or CPU-limit file-processing workers can contain the impact even if triggered.

Impact

The CVSS 6.5 score reflects a medium-severity availability-only impact (C:N/I:N/A:H) with no confidentiality or integrity consequence. The vector AV:N/AC:L/PR:N/UI:R indicates the attack is network-reachable with low complexity and requires no attacker authentication, but does require user interaction - specifically, a victim must open or process the crafted file. In server-side or automated pipelines (image upload processors, thumbnail generators) the UI:R flag is practically irrelevant because the 'user interaction' is the automated processing trigger. EPSS data was not provided in the input; no CISA KEV listing is present. No public exploit code has been identified at time of analysis. Despite the moderate CVSS score, the operational impact is disproportionate: the process does not crash (bypassing crash-based alerting), logs no error, and consumes 100% of a CPU core indefinitely - making detection and recovery operationally difficult. The attack is also highly automatable given the tiny payload size and the fact that parsing occurs before any validation gate. For deployments that accept user-supplied HEIF files without sandboxing, this vulnerability represents a realistic and high-priority denial-of-service vector.

Exploit ScenarioDerived

An attacker crafts an 800-byte malicious HEIF sequence file designed to trigger the unbounded loop in Box_stts::get_sample_duration(). The file is submitted to a web service that processes user-uploaded images (e.g., a profile photo uploader or media transcoder built on libheif). The moment the backend calls the library's file-open or parse function, the processing thread enters an infinite loop with no error output, permanently pegging one CPU core and rendering the worker thread unresponsive - with repeated submissions, all worker threads can be exhausted, taking the service offline. No public exploit code has been identified, but the attack requires only a crafted file and knowledge of the affected function, making independent reproduction straightforward.

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 19, 2026

Infinite CPU loop denial-of-service in libheif 1.21.2 and below allows a remote unauthenticated attacker to permanently exhaust a victim application's CPU by delivering a crafted 800-byte HEIF sequence file. The vulnerability triggers during file parsing in Box_stts::get_sample_duration() before any image decoding occurs, meaning any application that opens user-supplied HEIF files is exposed at the moment of file open. No KEV listing and no public exploit have been identified at time of analysis, but the low attack complexity and high availability impact make this a meaningful risk for deployments that process untrusted HEIF content. Vendor-released patch version 1.22.0 resolves the issue.

RemediationAI

Upgrade libheif to version 1.22.0 or later; this is the vendor-confirmed fix, available at https://github.com/strukturag/libheif/releases/tag/v1.22.0. The fix resolves the unbounded loop in Box_stts::get_sample_duration() and is confirmed by both the GitHub release and the GHSA advisory. For deployments that cannot immediately patch, compensating controls include: restricting HEIF file ingestion to authenticated, trusted sources only (reducing the attack surface to internal actors rather than arbitrary internet users); running libheif-based processing in isolated worker processes with CPU time limits (e.g., POSIX RLIMIT_CPU or cgroup cpu.cfs_quota_us) so that an infinite loop is killed automatically by the OS rather than starving the host - note this introduces processing latency and requires restart logic; and rejecting HEIF sequence files (as opposed to still images) at an upstream content-type or magic-bytes filter, since the vulnerable code path is specific to sequence containers. These workarounds carry operational trade-offs (dropped legitimate files, added infrastructure complexity) and are explicitly secondary to patching.

Affected VersionsENISA

libheif < 1.22.0

Affected Packages

euvd libheif fix: 1.22.0

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 (CPE: cpe:2.3:a:strukturag:libheif:*:*:*:*:*:*:*:*) is an open-source C++ library by strukturag for decoding and encoding HEIF (High Efficiency Image Format) and AVIF files, widely embedded in image-processing pipelines, media servers, and applications. HEIF files are structured as ISO Base Media File Format (ISOBMFF) containers; the Box_stts box holds sample-to-time tables used to derive frame durations during container parsing. CWE-835 (Loop with Unreachable Exit Condition) describes the root cause: Box_stts::get_sample_duration() contains an iteration path with no exit condition, timeout, or progress guard. Because the loop is entered during initial file parsing rather than during image decoding, every code path that calls the library's file-open function is affected - including server-side batch processors, headless converters, and any UI that triggers parsing before displaying a preview. The trigger file is only 800 bytes, making delivery via email attachment, web upload, or messaging trivial.

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 MEDIUM
Red Hat 6.5 MEDIUM

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

Lifecycle Timeline

1
Patch available
May 19, 2026 - 20:02 EUVD

DescriptionCVE.org

libheif is a HEIF and AVIF file format decoder and encoder. In versions 1.21.2 and below, a crafted 800-byte HEIF sequence file causes an infinite loop in Box_stts::get_sample_duration(), consuming 100% CPU indefinitely with zero progress, leading to DoS. The loop has no iteration limit or timeout and is triggered during file open (parsing) - before any user interaction or image decoding. The process stays alive (no crash, no error logged), making it invisible to crash-based monitoring. This issue has been fixed in version 1.22.0.

Threat Intelligence Overview

EPSS Score
0.0%
Top 87% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor 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.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

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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