libheif
CVE-2025-68431
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver crafted HEIF image to victim
-
ExploitUser opens image in libheif-backed app
-
ExecutionOut-of-bounds read in overlay()
-
ImpactLeak 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – 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)
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
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H
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).
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionNVD
Alpine Linux: libheif fixed in 1.21.2-r0
Executive ViewAI
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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
libheif v1.17.5 was discovered to contain a segmentation violation via the function UncompressedImageCodec::get_luma_bit
libheif v1.17.5 was discovered to contain a segmentation violation via the function find_exif_tag at /libheif/exif.cc. R
libheif v1.17.5 was discovered to contain a segmentation violation via the component /libheif/exif.cc. Rated high severi
libheif v1.17.5 was discovered to contain a segmentation violation via the function UncompressedImageCodec::decode_uncom
libheif 1.4.0 has a use-after-free in heif::HeifContext::Image::set_alpha_channel in heif_context.h because heif_context
In Libheif 1.17.6, insufficient checks in ImageOverlay::parse() decoding a heif file containing an overlay image with fo
libheif <= 1.17.6 contains a memory leak in the function JpegEncoder::Encode. Rated high severity (CVSS 7.5), this vulne
A Segmentation fault caused by a floating point exception exists in libheif 1.15.1 using crafted heif images via the hei
Buffer Overflow vulnerability in libheif 1.19.7 allows a local attacker to execute arbitrary code via the SAO (Sample Ad
Heap-based buffer overflow in libheif before 1.23.2 allows remote attackers to corrupt memory and potentially achieve co
Heap buffer overflow write in libheif (versions ≤ 1.21.2) lets a crafted HEIF/AVIF file write 64 bytes of attacker-contr
Arbitrary code execution in libheif 1.19.0 through 1.21.2 via a crafted HEIF file with uncompressed, tiled, component-in
NVD
CVE.org
EPSS
GitHub
Exploit-DB