Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-68431: CWE-125: Out-of-bounds Read in strukturag libheif

0
Medium
VulnerabilityCVE-2025-68431cvecve-2025-68431cwe-125cwe-190
Published: Mon Dec 29 2025 (12/29/2025, 19:09:54 UTC)
Source: CVE Database V5
Vendor/Project: strukturag
Product: libheif

Description

libheif is an HEIF and AVIF file format decoder and encoder. Prior to version 1.21.0, a crafted HEIF that exercises the overlay image item path triggers a heap buffer over-read in `HeifPixelImage::overlay()`. The function computes a negative row length (likely from an unclipped overlay rectangle or invalid offsets), which then underflows when converted to `size_t` and is passed to `memcpy`, causing a very large read past the end of the source plane and a crash. Version 1.21.0 contains a patch. As a workaround, avoid decoding images using `iovl` overlay boxes.

AI-Powered Analysis

AILast updated: 12/30/2025, 23:14:24 UTC

Technical Analysis

The vulnerability identified as CVE-2025-68431 affects the libheif library, which is widely used for decoding and encoding HEIF and AVIF image formats. The flaw lies in the HeifPixelImage::overlay() function, which handles overlay image items within HEIF files. When a specially crafted HEIF file exercises the overlay image item path, the function calculates a row length that can become negative due to an unclipped overlay rectangle or invalid offset values. This negative value is then cast to an unsigned size_t type, causing an integer underflow that results in a very large size passed to memcpy. Consequently, the memcpy operation reads beyond the allocated source buffer, leading to a heap buffer over-read and application crash. This vulnerability does not compromise confidentiality or integrity but impacts availability by causing denial of service. The vulnerability requires no privileges but does require user interaction to trigger, such as opening or processing a malicious HEIF image. The issue was addressed in libheif version 1.21.0 by correcting the bounds checking and overlay rectangle validation. No public exploits have been reported, but the nature of the vulnerability suggests potential for denial of service attacks if exploited. The workaround involves avoiding decoding images that include 'iovl' overlay boxes, which are the vector for triggering the vulnerability.

Potential Impact

For European organizations, the primary impact of CVE-2025-68431 is the risk of denial of service in applications or services that utilize libheif for image decoding. This includes media processing platforms, content management systems, digital asset management solutions, and any software handling HEIF or AVIF images. A successful exploit could cause application crashes, service interruptions, or system instability, potentially disrupting business operations or user experience. While no direct data breach or code execution is indicated, denial of service can affect availability of critical services, especially in sectors relying heavily on multimedia content such as media companies, digital marketing agencies, and software vendors. Additionally, embedded systems or IoT devices using libheif for image processing could be impacted, leading to device malfunctions. The requirement for user interaction limits remote exploitation but does not eliminate risk, as malicious images could be delivered via email, websites, or file sharing. Organizations processing large volumes of user-generated content or third-party images are particularly at risk.

Mitigation Recommendations

European organizations should immediately upgrade libheif to version 1.21.0 or later to apply the official patch that fixes the vulnerability. Where upgrading is not immediately feasible, implement strict input validation and filtering to block or quarantine HEIF images containing overlay ('iovl') boxes. Employ sandboxing or isolated environments for image processing tasks to contain potential crashes and prevent broader system impact. Update antivirus and endpoint protection solutions to detect malformed HEIF files exploiting this vulnerability. Educate users and administrators about the risks of opening untrusted HEIF images, especially those received via email or downloaded from unverified sources. Monitor application logs for crashes related to image decoding and investigate suspicious image files. For embedded or IoT devices using libheif, coordinate with vendors for firmware updates or apply mitigations to restrict image input sources. Finally, integrate this vulnerability into incident response plans to quickly address any exploitation attempts.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2025-12-17T15:29:39.380Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 695450b3db813ff03e2beea9

Added to database: 12/30/2025, 10:22:43 PM

Last enriched: 12/30/2025, 11:14:24 PM

Last updated: 2/7/2026, 2:17:07 AM

Views: 45

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats