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-2026-32741: CWE-122: Heap-based Buffer Overflow in strukturag libheif

0
High
VulnerabilityCVE-2026-32741cvecve-2026-32741cwe-122
Published: Tue May 19 2026 (05/19/2026, 19:57:26 UTC)
Source: CVE Database V5
Vendor/Project: strukturag
Product: libheif

Description

A heap-based buffer overflow vulnerability exists in libheif versions 1. 21. 2 and below within the MaskImageCodec::decode_mask_image() function. The flaw occurs when decoding a HEIF file containing a mask image where the copy length is attacker-controlled and can exceed the allocated pixel buffer size, leading to a heap overflow. This issue is triggered under specific conditions related to image properties and has been fixed in version 1. 22. 0. The vulnerability has a CVSS score of 7. 1, indicating high severity, with potential impact on availability due to heap corruption. No known exploits are reported in the wild at this time.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/19/2026, 20:48:40 UTC

Technical Analysis

libheif is a library for decoding and encoding HEIF and AVIF image formats. Versions up to 1.21.2 contain a heap-based buffer overflow in the MaskImageCodec::decode_mask_image() function. The vulnerability arises because the function copies data from an iloc extent field, which is attacker-controlled, into a pixel buffer without verifying that the data size fits within the buffer. Specifically, when the mask image properties specify bits_per_pixel = 8 and an even width ≥ 64, the stride equals the width, and the unchecked memcpy operation can overflow the heap buffer. This flaw allows an attacker to craft a malicious HEIF file that triggers the overflow. The issue has been resolved in libheif version 1.22.0.

Potential Impact

Exploitation of this vulnerability can lead to a heap-based buffer overflow, which may cause application crashes or potentially enable denial of service. The CVSS vector indicates no confidentiality impact, low integrity impact, but high availability impact. There are no reports of active exploitation in the wild. The vulnerability requires the victim to decode a maliciously crafted HEIF file containing a mask image with specific properties.

Mitigation Recommendations

A fix for this vulnerability is available in libheif version 1.22.0. Users and vendors should upgrade to version 1.22.0 or later to remediate this issue. Since this is a library vulnerability, applications using libheif should update their dependencies accordingly. No additional mitigations are specified or required beyond applying the official fix.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-13T15:02:00.628Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a0cc91dba1db47362ec07c7

Added to database: 5/19/2026, 8:33:33 PM

Last enriched: 5/19/2026, 8:48:40 PM

Last updated: 5/20/2026, 1:33:12 PM

Views: 9

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 for AI refresh and higher limits.

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

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses