Skip to main content

libheif CVE-2025-68431

HIGH
Out-of-bounds Read (CWE-125)
N/A vendor:alpine
7.1
CVSS 3.1 · NVD
View

Attack ChainAIDerived

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

  1. Access
    Deliver crafted HEIF image to victim
  2. Exploit
    User opens image in libheif-backed app
  3. Execution
    Out-of-bounds read in overlay()
  4. Impact
    Leak adjacent memory or crash process

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 victim's application or service to decode an attacker-supplied HEIF/HEIC image that exercises the image-overlay (overlay/iovl derivation) code path in HeifPixelImage::overlay(), where a crafted offset caused a copy width of in_w - in_x0 to read beyond the source buffer. No authentication is required (PR:N), but user interaction IS required (UI:R): a user or automated pipeline must open, preview, or process the malicious file in software linked against vulnerable libheif (< the fixed release; Alpine < 1.21.2-r0). Limiting factors: the overlay/derived-image feature must be triggered, impact is confined to memory disclosure plus crash (no code execution or integrity impact claimed), and the requirement that someone process the file prevents unattended, wormable exploitation.

Impact

Signals align toward a moderate, not urgent, priority. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H, base 7.1) describes an unauthenticated, low-complexity flaw that nonetheless requires user interaction (UI:R) - a victim must open or process a crafted HEIF image - which meaningfully caps mass-exploitation potential. EPSS is very low at 0.04% (14th percentile), consistent with a client-side memory-safety bug in an image library rather than a server-side RCE. The CWE-125 out-of-bounds read, confirmed by the one-line fix in HeifPixelImage::overlay() (clamping the copy width from in_w - in_x0 back to in_w), limits impact to information disclosure (C:L) and process crash/denial of service (A:H); there is no integrity impact (I:N) and no arbitrary code execution claimed. This is NOT in CISA KEV, so there is no confirmed active exploitation; however, exploit code is reported publicly available, so weaponization against targeted users is plausible. Note a mild tension: the input Tags label this 'Buffer Overflow,' but the CWE-125 classification and the diff indicate an out-of-bounds READ, not a write-based overflow - treat RCE claims with skepticism. Net: a real bug worth patching in image-processing pipelines, but the UI:R requirement and low EPSS argue against emergency prioritization absent evidence of targeting.

Exploit ScenarioDerived

An attacker crafts a malicious HEIF/HEIC image with a malformed overlay (image grid/overlay derivation) that drives an out-of-bounds read during HeifPixelImage::overlay(). The victim opens or previews the image in any application or service linked against vulnerable libheif, causing the process to read past the pixel buffer and either leak adjacent heap memory into the output or crash. Publicly available exploit code exists, lowering the barrier for targeted delivery via email, chat, or a web page.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.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

AnalysisAIv2 – Oct 07, 2026

Out-of-bounds read in libheif's HEIF/HEIC overlay processing can disclose limited memory contents and crash affected applications when a user or automated pipeline opens or previews a crafted image; per the CVSS vector, no authentication is required (PR:N), but user interaction is required (UI:R), and exploitation depends on reaching the overlay/iovl derivation path. Publicly available exploit code exists per the source advisory, but CISA KEV does not confirm active exploitation and EPSS is 0.04% (14th percentile), aligning with a moderate, not urgent, priority. Alpine Linux libheif before 1.21.2-r0 is affected, and the upstream fix is commit b8c12a7b70f46c9516711a988483bed377b78d46.

Earlier versions of this analysis (1)
v1 May 27, 2026 - 22:47

libheif, a library for reading and writing HEIF and AVIF image files, received a security fix in Alpine Linux package version 1.21.2-r0. The specific vulnerability class, impact, and exploitation method are not described in available intelligence - the CVE record contains only a changelog-style fix notice from the Alpine Linux vendor. With an EPSS score of 0.04% (14th percentile), automated exploitation at scale is considered unlikely based on current threat intelligence signals, though the absence of CVSS data prevents a complete risk characterization. No public exploit code has been identified and this CVE is not listed in the CISA KEV catalog.

RemediationAI

Vendor-released patch: Alpine Linux libheif 1.21.2-r0 (fixed version) incorporates upstream commit b8c12a7b70f46c9516711a988483bed377b78d46; upgrade to libheif 1.21.2-r0 or later, or apply the corresponding distribution update that contains the upstream fix, and consult https://github.com/strukturag/libheif/security/advisories/GHSA-j87x-4gmq-cqfq for details. If patching is delayed, disable or restrict processing of untrusted HEIF/HEIC images, particularly those using overlay/derived-image (iovl) features: this reduces exposure but breaks legitimate workflows that rely on those image types. Because exploitation requires a user or automated pipeline to open the malicious file (UI:R), enforce sandboxing or decoder isolation for image processing and block untrusted images at ingestion points where feasible, accepting reduced functionality as the trade-off. Publicly available exploit code exists, so treat exposed image-processing services as higher priority, though no active exploitation is confirmed by CISA KEV.

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 is the Struktur HEIF/HEIC image codec library used by Alpine Linux and other environments that decode high-efficiency image files. The issue is CWE-125 (Out-of-bounds Read) in HeifPixelImage::overlay() during overlay/derived-image (iovl) processing, where a crafted offset causes the copy width in_w - in_x0 to read beyond the source buffer. The upstream patch commit b8c12a7b70f46c9516711a988483bed377b78d46 changes that width to in_w to correct the bounds calculation. The CPE cpe:2.3:a:struktur:libheif:*:*:*:*:*:*:*:* identifies the affected product family across versions prior to the fixed release, and the CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H describes network-delivered image decoding, no authentication, required user interaction, low confidentiality impact, and high availability impact from crashes. The vendor advisory is https://github.com/strukturag/libheif/security/advisories/GHSA-j87x-4gmq-cqfq.

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

NVD PRIMARY 7.1 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H
vuln.today AI 7.1 HIGH

Crafted image can be delivered remotely (AV:N) and triggers deterministically (AC:L) with no auth (PR:N) but needs the user to open it (UI:R); OOB read yields limited info leak (C:L) and crash (A:H).

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

Primary rating from NVD.

CVSS VectorNVD

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

Lifecycle Timeline

3
PoC Detected
Oct 07, 2026 - 12:22 NVD
https://github.com/strukturag/libheif/security/advisories/GHSA-j87x-4gmq-cqfq
Patch released
Oct 07, 2026 - 12:22 NVD
https://github.com/strukturag/libheif/commit/b8c12a7b70f46c9516711a988483bed377b78d46
CVSS changed
Oct 07, 2026 - 12:22 NVD
7.1 (HIGH)

DescriptionNVD

Alpine Linux: libheif fixed in 1.21.2-r0

Executive ViewAI

Why It Matters

Alpine Linux's libheif package, an HEIF/HEIC image parsing library, contains a high-severity out-of-bounds read that can expose limited process memory and crash applications when users or automated pipelines open or preview crafted images. The flaw is unauthenticated per its CVSS vector but requires user interaction and a specific overlay/iovl derivation path, so business risk is concentrated in endpoints and services that ingest untrusted image files. Because publicly available exploit code exists but there is no confirmed active exploitation and a vendor patch is available, leadership should treat this as a prioritized patch-management issue, not an emergency incident.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 86% exploitable
Prevalence
High
core HEIC/HEIF decoding library bundled across Linux distros and image apps
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

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 HIGH
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
Medium

Priority Score

56
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: +20
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)NVD

cpe:2.3:a:struktur: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-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

CVE-2026-47178 HIGH
7.8 Jul 21

Arbitrary code execution in libheif 1.19.0 through 1.21.2 via a crafted HEIF file with uncompressed, tiled, component-in

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