Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-32741— libheif has a heap buffer overflow in decode_mask_image()

Quick assessment

Affected
strukturag libheif
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

libheif是struktur开源的一款 ISO/IEC 23008-12:2017 HEIF 文件格式解码器和编码器。 libheif 1.21.2及之前版本存在安全漏洞,该漏洞源于MaskImageCodec::decode_mask_image()中堆缓冲区溢出,未对数据长度进行上限检查,导致memcpy复制超出目标缓冲区大小。

CVSS 7.1 · High EPSS 0.45% · P37

Possible ATT&CK Techniques 1 AI

T1203 · Exploitation for Client Execution

Affected Version Matrix 1

VendorProduct Version RangeStatus
strukturag libheif < 1.22.0 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-32741

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
libheif has a heap buffer overflow in decode_mask_image()
Source: CVE Program / CVE List V5
Vulnerability Description
libheif is a HEIF and AVIF file format decoder and encoder. Versions 1.21.2 and below contain a heap buffer overflow in MaskImageCodec::decode_mask_image(). When decoding a HEIF file containing a mask image (mski), the function copies the full iloc extent data into a pixel buffer using memcpy(dst, data.data(), data.size()). The copy length data.size() is determined by the iloc extent in the file (attacker-controlled), while the destination buffer is sized based on the declared image dimensions. Because no upper-bound check exists on the data length, a crafted file whose iloc extent exceeds the pixel buffer allocation overflows the heap. The vulnerable single-memcpy branch is reached when the mskC property specifies bits_per_pixel = 8 and the ispe property declares an even width ≥ 64 (so that stride == width), with no changes to default security limits or external codec plugins required. This issue has been fixed in version 1.22.0.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
堆缓冲区溢出
Source: CVE Program / CVE List V5
Vulnerability Title
libheif 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
libheif是struktur开源的一款 ISO/IEC 23008-12:2017 HEIF 文件格式解码器和编码器。 libheif 1.21.2及之前版本存在安全漏洞,该漏洞源于MaskImageCodec::decode_mask_image()中堆缓冲区溢出,未对数据长度进行上限检查,导致memcpy复制超出目标缓冲区大小。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
strukturag libheif < 1.22.0 -

II. Public POCs for CVE-2026-32741

# POC Description Source Link Shenlong Link
AI-Generated POC Premium
Qwen3.6-35B-A3B · 14865 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2026-32741

请登录查看更多情报信息。

Vendor Advisories for CVE-2026-32741 (1)

Vendor Pages for CVE-2026-32741 (1)

Same Patch Batch · strukturag · 2026-05-19 · 6 CVEs total

CVE-2026-32740 8.8 HIGH libheif: Heap-Buffer-Overflow Write in Grid Tile Chroma Compositing
CVE-2026-32882 7.1 HIGH libheif: Heap Buffer OOB Read in overlay compositing due to wrong alpha stride
CVE-2026-32738 6.5 MEDIUM libheif has a Heap OOB Read/SEGV Crash via Zero samples_per_chunk
CVE-2026-32739 6.5 MEDIUM libheif is Vulnerable to Infinite Loop DoS via stts Sample Duration Lookup
CVE-2026-32814 6.5 MEDIUM libheif: Uninitialized Heap Memory Information Leak via Failed Grid Tiles

IV. Related Vulnerabilities

V. Comments for CVE-2026-32741

No comments yet


Leave a comment